Godot.SourceGenerators.csproj 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <Project Sdk="Microsoft.NET.Sdk">
  2. <PropertyGroup>
  3. <TargetFramework>netstandard2.0</TargetFramework>
  4. <LangVersion>8.0</LangVersion>
  5. <Nullable>enable</Nullable>
  6. </PropertyGroup>
  7. <PropertyGroup>
  8. <Description>Core C# source generator for Godot projects.</Description>
  9. <Authors>Godot Engine contributors</Authors>
  10. <PackageId>Godot.SourceGenerators</PackageId>
  11. <Version>4.0.0</Version>
  12. <PackageVersion>$(PackageVersion_Godot_SourceGenerators)</PackageVersion>
  13. <RepositoryUrl>https://github.com/godotengine/godot/tree/master/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators</RepositoryUrl>
  14. <PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
  15. <PackageLicenseExpression>MIT</PackageLicenseExpression>
  16. <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
  17. <!-- Do not include the generator as a lib dependency -->
  18. <IncludeBuildOutput>false</IncludeBuildOutput>
  19. </PropertyGroup>
  20. <ItemGroup>
  21. <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.8.0" PrivateAssets="all" />
  22. <PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.1" PrivateAssets="all" />
  23. </ItemGroup>
  24. <ItemGroup>
  25. <!-- Package the generator in the analyzer directory of the nuget package -->
  26. <None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
  27. <!-- Package the props file -->
  28. <None Include="Godot.SourceGenerators.props" Pack="true" PackagePath="build" Visible="false" />
  29. </ItemGroup>
  30. <Target Name="CopyNupkgToSConsOutputDir" AfterTargets="Pack">
  31. <PropertyGroup>
  32. <GodotSourceRootPath>$(SolutionDir)\..\..\..\..\</GodotSourceRootPath>
  33. <GodotOutputDataDir>$(GodotSourceRootPath)\bin\GodotSharp\</GodotOutputDataDir>
  34. </PropertyGroup>
  35. <Copy SourceFiles="$(PackageOutputPath)$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$(GodotOutputDataDir)Tools\nupkgs\" />
  36. </Target>
  37. </Project>