feat: add NuGet and Godot distribution

This commit is contained in:
2026-09-05 03:41:30 +08:00
parent f8906faaec
commit dcbecea0f1
8 changed files with 142 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
#nullable enable
using System.Collections.Generic;
using ShrinkApp;
using ShrinkCommand.Integration.App;
using ShrinkContext;
using ShrinkContext.AppAdapter;
using ShrinkDataSaver.Integration.App;
using ShrinkNetwork.Integration.App;
namespace ShrinkApp.Starter.Basic;
public static class ShrinkBasicComposition
{
public static ShrinkContextAppHost CreateHost(ShrinkAppServices? services = null)
{
var host = new ShrinkContextAppHost(services);
host.Register<ShrinkCommandAppComponent>("shrink.command");
host.Register<ShrinkDataSaverAppComponent>("shrink.datasaver");
host.Register<ShrinkNetworkAppComponent>("shrink.network");
return host;
}
public static IReadOnlyList<ShrinkLoaderEntry> CreateEntries(ShrinkAppServices services,
ShrinkNetworkAppModuleConfig? network = null) => new[]
{
new ShrinkLoaderEntry("datasaver", "shrink.datasaver", services),
new ShrinkLoaderEntry("command", "shrink.command", services),
new ShrinkLoaderEntry("network", "shrink.network", network ?? new ShrinkNetworkAppModuleConfig
{
Services = services
})
};
}
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<AssemblyName>ShrinkApp.Starter.Basic</AssemblyName>
<RootNamespace>ShrinkApp.Starter.Basic</RootNamespace>
<PackageId>ShrinkSDK.App.Starter.Basic</PackageId>
<Version>0.3.0</Version>
<Description>Engine-neutral basic ShrinkApp composition.</Description>
<ShrinkCodeGenEnabled>false</ShrinkCodeGenEnabled>
</PropertyGroup>
<ItemGroup>
<Compile Include="Runtime\*.cs" />
<PackageReference Include="ShrinkSDK.App.Core" Version="0.2.0" />
<PackageReference Include="ShrinkSDK.Context.Core" Version="0.2.0" />
<PackageReference Include="ShrinkSDK.Context.AppAdapter" Version="0.2.0" />
<PackageReference Include="ShrinkSDK.Command.Integration.App" Version="0.2.0" />
<PackageReference Include="ShrinkSDK.DataSaver.Integration.App" Version="0.2.0" />
<PackageReference Include="ShrinkSDK.Network.Integration.App" Version="0.2.0" />
</ItemGroup>
</Project>