Skip to content

Commit df905bf

Browse files
authored
nugetで公開できるように各種Propertyを追加 (#179)
* Coreをnuget packaging化するために、各種Property追加 * 利用者がDebugしやすいようにSourceLinkを追加 * いらない依存は削除 * MAUIのpackageもnuget化出来るように
1 parent 111461a commit df905bf

File tree

3 files changed

+66
-9
lines changed

3 files changed

+66
-9
lines changed

src/VoicevoxCoreSharp.Core/VoicevoxCoreSharp.Core.csproj

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,34 @@
1313
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
1414
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
1515
<EnableAotAnalyzer>true</EnableAotAnalyzer>
16+
17+
<!-- NuGet Package Properties -->
18+
<PackageId>VoicevoxCoreSharp.Core</PackageId>
19+
<Authors>yamachu</Authors>
20+
<Description>VoicevoxCore C# binding library</Description>
21+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
22+
<PackageProjectUrl>https://github.com/yamachu/VoicevoxCoreSharp</PackageProjectUrl>
23+
<RepositoryUrl>https://github.com/yamachu/VoicevoxCoreSharp</RepositoryUrl>
24+
<PackageTags>voicevox;tts</PackageTags>
25+
<PackageReadmeFile>README.md</PackageReadmeFile>
26+
27+
<DebugType>portable</DebugType>
28+
<IncludeSymbols>true</IncludeSymbols>
29+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
30+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
31+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
32+
<!-- when packaging, dotnet pack -p:PackageVersion=0.16.0 -c Release -->
33+
<!-- <Version>0.0.0</Version> -->
1634
</PropertyGroup>
1735

36+
<ItemGroup>
37+
<None Include="../../README.md" Pack="true" PackagePath="/" />
38+
</ItemGroup>
39+
40+
<ItemGroup>
41+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
42+
</ItemGroup>
43+
1844
<Import Project="VoicevoxCoreSharp.Core.Metas.props" />
1945

2046
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
WIP
Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
5-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
5+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
66
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
7-
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
7+
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
88
<UseMaui>true</UseMaui>
99
<SingleProject>true</SingleProject>
1010
<ImplicitUsings>enable</ImplicitUsings>
@@ -16,14 +16,44 @@
1616
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
1717
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
1818
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
19+
20+
<!-- NuGet Package Properties -->
21+
<PackageId>VoicevoxCoreSharp.MAUI</PackageId>
22+
<Authors>yamachu</Authors>
23+
<Description>VoicevoxCore MAUI support library</Description>
24+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
25+
<PackageProjectUrl>https://github.com/yamachu/VoicevoxCoreSharp</PackageProjectUrl>
26+
<RepositoryUrl>https://github.com/yamachu/VoicevoxCoreSharp</RepositoryUrl>
27+
<PackageTags>voicevox;tts;maui</PackageTags>
28+
<PackageReadmeFile>README.md</PackageReadmeFile>
29+
30+
<DebugType>portable</DebugType>
31+
<IncludeSymbols>true</IncludeSymbols>
32+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
33+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
34+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
1935
</PropertyGroup>
2036

2137
<ItemGroup>
22-
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
23-
</ItemGroup>
24-
25-
<ItemGroup>
26-
<ProjectReference Include="..\VoicevoxCoreSharp.Core\VoicevoxCoreSharp.Core.csproj" />
38+
<ProjectReference Include="..\VoicevoxCoreSharp.Core\VoicevoxCoreSharp.Core.csproj">
39+
<PrivateAssets>None</PrivateAssets>
40+
</ProjectReference>
41+
</ItemGroup>
42+
43+
<ItemGroup>
44+
<None Include="README.md" Pack="true" PackagePath="/" />
45+
</ItemGroup>
46+
47+
<ItemGroup>
48+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
2749
</ItemGroup>
2850

51+
<!-- https://blog.azyobuzi.net/2020/05/03/01-projectref/ -->
52+
<!-- dotnet pack -p:CoreVersion=0.16.0 -p:PackageVersion=0.16.0 -->
53+
<Target Name="SetDependencyVersion" AfterTargets="_GetProjectReferenceVersions">
54+
<ItemGroup>
55+
<_ProjectReferencesWithVersions Update="..\VoicevoxCoreSharp.Core\VoicevoxCoreSharp.Core.csproj" ProjectVersion="$(CoreVersion)" />
56+
</ItemGroup>
57+
</Target>
58+
2959
</Project>

0 commit comments

Comments
 (0)