refactor: move Godot packages into module repositories
Validate ShrinkSDK Workspace / unity (push) Failing after 5s
Validate ShrinkSDK Workspace / unity (push) Failing after 5s
This commit is contained in:
Submodule Assets/Modules/ShrinkApp.Core updated: a5c5a70075...f077a32e3e
Submodule Assets/Modules/ShrinkApp.Starter.Basic updated: f8906faaec...dcbecea0f1
Submodule Assets/Modules/ShrinkCommand updated: 4ed7a91c79...9d66781ddf
Submodule Assets/Modules/ShrinkCommand.Integration.App updated: 57246d5194...d2642d56de
Submodule Assets/Modules/ShrinkCommand.Integration.EventBus updated: 53720a3b71...302acba9bd
Submodule Assets/Modules/ShrinkCommand.Integration.Network updated: bf315619f0...9f128c0432
Submodule Assets/Modules/ShrinkContext.AppAdapter updated: 8b3121bc21...3c08d076c5
Submodule Assets/Modules/ShrinkContext.Core updated: a4c78ea7a7...63fb328bed
Submodule Assets/Modules/ShrinkContext.EventBusAdapter updated: 088a8f9606...06ce2b7188
Submodule Assets/Modules/ShrinkDataSaver updated: 0030f5b794...422cf9a48b
Submodule Assets/Modules/ShrinkDataSaver.Integration.App updated: e7da03273e...b2025072fc
Submodule Assets/Modules/ShrinkDataSaver.Integration.EventBus updated: 599b8e34c6...663e46f2d7
Submodule Assets/Modules/ShrinkEventBus updated: 8aa4c79604...64ce75a341
Submodule Assets/Modules/ShrinkInstaller updated: e97692e768...b505c5ebb1
Submodule Assets/Modules/ShrinkModFramework updated: fea6ec56fc...2c48d247b8
Submodule Assets/Modules/ShrinkNetwork updated: 26241cb534...f573c8e742
Submodule Assets/Modules/ShrinkNetwork.Integration.App updated: 2cd552ef25...a970bb475a
Submodule Assets/Modules/ShrinkNetwork.Integration.EventBus updated: eb7fa55656...3a1dc91c85
+1
Submodule Assets/Modules/ShrinkRuntime.Abstractions added at ce8efad5b3
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fdcff332146fc1d439fc0c82285637da
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"name": "ShrinkRuntime.Abstractions",
|
||||
"rootNamespace": "ShrinkSDK.Runtime",
|
||||
"autoReferenced": true
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9285a23e48a9fd04ea5d3a7507010d2b
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,127 +0,0 @@
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ShrinkSDK.Runtime
|
||||
{
|
||||
public enum ShrinkLogLevel { Trace, Debug, Information, Warning, Error }
|
||||
|
||||
public interface IShrinkLogger
|
||||
{
|
||||
void Log(ShrinkLogLevel level, string message, Exception? exception = null);
|
||||
}
|
||||
|
||||
public interface IShrinkMainThreadDispatcher
|
||||
{
|
||||
bool IsMainThread { get; }
|
||||
bool TryPost(Action action);
|
||||
}
|
||||
|
||||
public interface IShrinkClock
|
||||
{
|
||||
DateTimeOffset UtcNow { get; }
|
||||
double UnscaledTimeSeconds { get; }
|
||||
}
|
||||
|
||||
public interface IShrinkPathProvider
|
||||
{
|
||||
string PersistentDataPath { get; }
|
||||
string TemporaryDataPath { get; }
|
||||
}
|
||||
|
||||
public interface IShrinkScreenshotProvider
|
||||
{
|
||||
ValueTask<byte[]> CapturePngAsync(CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
public interface IShrinkApplicationLifecycle
|
||||
{
|
||||
event Action? Paused;
|
||||
event Action? Resumed;
|
||||
event Action? Exiting;
|
||||
}
|
||||
|
||||
public static class ShrinkLoggerExtensions
|
||||
{
|
||||
public static void Error(this IShrinkLogger logger, string message, Exception? exception = null) =>
|
||||
logger.Log(ShrinkLogLevel.Error, message, exception);
|
||||
}
|
||||
|
||||
public static class ShrinkRuntimeServices
|
||||
{
|
||||
private static IShrinkLogger _logger = new ConsoleLogger();
|
||||
private static IShrinkMainThreadDispatcher _dispatcher = new InlineDispatcher();
|
||||
private static IShrinkClock _clock = new SystemClock();
|
||||
private static IShrinkPathProvider _paths = new SystemPaths();
|
||||
|
||||
public static IShrinkLogger Logger => _logger;
|
||||
public static IShrinkMainThreadDispatcher Dispatcher => _dispatcher;
|
||||
public static IShrinkClock Clock => _clock;
|
||||
public static IShrinkPathProvider Paths => _paths;
|
||||
public static IShrinkScreenshotProvider? Screenshots { get; private set; }
|
||||
public static IShrinkApplicationLifecycle? Lifecycle { get; private set; }
|
||||
|
||||
public static void Configure(IShrinkLogger logger, IShrinkMainThreadDispatcher dispatcher,
|
||||
IShrinkClock clock, IShrinkPathProvider paths,
|
||||
IShrinkScreenshotProvider? screenshots = null, IShrinkApplicationLifecycle? lifecycle = null)
|
||||
{
|
||||
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||
_dispatcher = dispatcher ?? throw new ArgumentNullException(nameof(dispatcher));
|
||||
_clock = clock ?? throw new ArgumentNullException(nameof(clock));
|
||||
_paths = paths ?? throw new ArgumentNullException(nameof(paths));
|
||||
Screenshots = screenshots;
|
||||
Lifecycle = lifecycle;
|
||||
}
|
||||
|
||||
private sealed class ConsoleLogger : IShrinkLogger
|
||||
{
|
||||
public void Log(ShrinkLogLevel level, string message, Exception? exception = null)
|
||||
{
|
||||
Console.WriteLine($"[{level}] {message}");
|
||||
if (exception != null) Console.WriteLine(exception);
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class InlineDispatcher : IShrinkMainThreadDispatcher
|
||||
{
|
||||
public bool IsMainThread => true;
|
||||
public bool TryPost(Action action)
|
||||
{
|
||||
if (action == null) return false;
|
||||
action();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class SystemClock : IShrinkClock
|
||||
{
|
||||
private readonly Stopwatch _stopwatch = Stopwatch.StartNew();
|
||||
public DateTimeOffset UtcNow => DateTimeOffset.UtcNow;
|
||||
public double UnscaledTimeSeconds => _stopwatch.Elapsed.TotalSeconds;
|
||||
}
|
||||
|
||||
private sealed class SystemPaths : IShrinkPathProvider
|
||||
{
|
||||
public string PersistentDataPath => Path.Combine(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "ShrinkSDK");
|
||||
public string TemporaryDataPath => Path.GetTempPath();
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
|
||||
public sealed class ShrinkCodeGenWovenAttribute : Attribute
|
||||
{
|
||||
public ShrinkCodeGenWovenAttribute(string weaverVersion, string inputMvid)
|
||||
{
|
||||
WeaverVersion = weaverVersion;
|
||||
InputMvid = inputMvid;
|
||||
}
|
||||
|
||||
public string WeaverVersion { get; }
|
||||
public string InputMvid { get; }
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f9b07df5ab1dc345be31f33e94077d2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"name": "com.cneicy.shrink-runtime-abstractions",
|
||||
"version": "0.1.0",
|
||||
"displayName": "ShrinkSDK Runtime Abstractions",
|
||||
"description": "Engine-neutral runtime services and CodeGen marker contracts.",
|
||||
"unity": "2022.3"
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2f07481a8e08f454fa1d85c5afe4c92d
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Submodule Assets/Modules/ShrinkShared.CodeGen updated: 5fd9b258d7...371e880b84
Submodule Assets/Modules/ShrinkTutorial updated: 5d66389bd6...8898221198
Reference in New Issue
Block a user