summaryrefslogtreecommitdiffstats
path: root/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/Godot.SourceGenerators.csproj
blob: 11d8e0f72b9c49678db4b191b2f5134de841de84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <LangVersion>8.0</LangVersion>
    <Nullable>enable</Nullable>
  </PropertyGroup>
  <PropertyGroup>
    <Description>Core C# source generator for Godot projects.</Description>
    <Authors>Godot Engine contributors</Authors>

    <PackageId>Godot.SourceGenerators</PackageId>
    <Version>4.0.0</Version>
    <PackageVersion>$(PackageVersion_Godot_SourceGenerators)</PackageVersion>
    <RepositoryUrl>https://github.com/godotengine/godot/tree/master/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators</RepositoryUrl>
    <PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
    <PackageLicenseExpression>MIT</PackageLicenseExpression>

    <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
    <!-- Do not include the generator as a lib dependency -->
    <IncludeBuildOutput>false</IncludeBuildOutput>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.8.0" PrivateAssets="all" />
    <PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.1" PrivateAssets="all" />
  </ItemGroup>
  <ItemGroup>
    <!-- Package the generator in the analyzer directory of the nuget package -->
    <None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />

    <!-- Package the props file -->
    <None Include="Godot.SourceGenerators.props" Pack="true" PackagePath="build" Visible="false" />
  </ItemGroup>

  <Target Name="CopyNupkgToSConsOutputDir" AfterTargets="Pack">
    <PropertyGroup>
      <GodotSourceRootPath>$(SolutionDir)\..\..\..\..\</GodotSourceRootPath>
      <GodotOutputDataDir>$(GodotSourceRootPath)\bin\GodotSharp\</GodotOutputDataDir>
    </PropertyGroup>
    <Copy SourceFiles="$(PackageOutputPath)$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$(GodotOutputDataDir)Tools\nupkgs\" />
  </Target>
</Project>