Skip to content

Commit

Permalink
Merge pull request #78 from hadashiA/ku/pack-generators
Browse files Browse the repository at this point in the history
Pack multiple versions of source generators into the nuget package
  • Loading branch information
hadashiA authored Jan 23, 2024
2 parents 860f425 + 61b6124 commit 3ccafef
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 14 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ jobs:
- run: dotnet build -c Release
- run: dotnet test -c Release --no-build
- run: dotnet pack -c Release --no-build -o ./publish
- run: |
rm ./publish/VYaml.Benchmark.*
rm ./publish/VYaml.SourceGenerator.Roslyn3.*
- uses: actions/upload-artifact@v3
with:
name: nuget
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<!-- NuGet Packaging -->
<PackageVersion>0.20.0</PackageVersion>
<PackageVersion>0.21.0</PackageVersion>
<Authors>hadashiA</Authors>
<PackageProjectUrl>https://github.com/hadashiA/VYaml</PackageProjectUrl>
<RepositoryUrl>$(PackageProjectUrl)</RepositoryUrl>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Require Unity 2021.3 or later.
If you are using a version of Unity newer than 2022.2, you can install as the Unity package manager at the following git URL;

```
https://github.com/hadashiA/VYaml.git?path=VYaml.Unity/Assets/VYaml#0.20.0
https://github.com/hadashiA/VYaml.git?path=VYaml.Unity/Assets/VYaml#0.21.0
```

If you are using Unity 2022.1 or older, the git url cannot be used as is because the source generator versions are different.
Expand Down
2 changes: 1 addition & 1 deletion VYaml.Annotations/VYaml.Annotations.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.1;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net6.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>9</LangVersion>
Expand Down
1 change: 1 addition & 0 deletions VYaml.Benchmark/VYaml.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion VYaml.Core/VYaml.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<LangVersion>9</LangVersion>
<ImplicitUsings>disable</ImplicitUsings>
<RootNamespace>VYaml</RootNamespace>
<TargetFrameworks>netstandard2.1;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net6.0;net8.0</TargetFrameworks>
<Description>VYaml core apis</Description>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
<IsRoslynComponent>true</IsRoslynComponent>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>

<PackageTags>yaml</PackageTags>
<Description>Code generator for VYaml</Description>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions VYaml.SourceGenerator/VYaml.SourceGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
<IsRoslynComponent>true</IsRoslynComponent>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>

<PackageTags>yaml</PackageTags>
<Description>Code generator for VYaml</Description>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion VYaml.Unity/Assets/VYaml/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jp.hadashikick.vyaml",
"displayName": "VYaml",
"version": "0.20.0",
"version": "0.21.0",
"unity": "2021.3",
"description": "The extra fast YAML library",
"keywords": ["yaml", "serialization", "parser"],
Expand Down
18 changes: 16 additions & 2 deletions VYaml/VYaml.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.1;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net6.0;net8.0</TargetFrameworks>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand All @@ -12,12 +12,26 @@
<Description>The extra fast YAML library for C#</Description>
</PropertyGroup>

<!-- Bundle SourceGenerator -->
<ItemGroup>
<None Include="..\VYaml.SourceGenerator\bin\$(Configuration)\netstandard2.0\VYaml.SourceGenerator.dll"
PackagePath="analyzers\dotnet\roslyn4.1\cs"
Pack="true"
Visible="false" />

<None Include="..\VYaml.SourceGenerator.Roslyn3\bin\$(Configuration)\netstandard2.0\VYaml.SourceGenerator.Roslyn3.dll"
PackagePath="analyzers\dotnet\roslyn3.8\cs"
Pack="true"
Visible="false" />
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="VYaml.Tests" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\VYaml.Core\VYaml.Core.csproj" />
<ProjectReference Include="..\VYaml.SourceGenerator\VYaml.SourceGenerator.csproj" />
<ProjectReference Include="..\VYaml.SourceGenerator\VYaml.SourceGenerator.csproj"
ReferenceOutputAssembly="false" />
</ItemGroup>
</Project>

0 comments on commit 3ccafef

Please sign in to comment.