2020-10-23 15:25:16 +08:00
|
|
|
<Project>
|
|
|
|
<!-- Generate C# file with the version of all the nupkgs bundled with Godot -->
|
|
|
|
|
|
|
|
<Target Name="SetPropertiesForGenerateGodotNupkgsVersions">
|
|
|
|
<PropertyGroup>
|
|
|
|
<GeneratedGodotNupkgsVersionsFile>$(IntermediateOutputPath)GodotNupkgsVersions.g.cs</GeneratedGodotNupkgsVersionsFile>
|
|
|
|
</PropertyGroup>
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="GenerateGodotNupkgsVersionsFile"
|
2021-12-29 06:25:16 +08:00
|
|
|
DependsOnTargets="_GenerateGodotNupkgsVersionsFile"
|
|
|
|
BeforeTargets="PrepareForBuild;CompileDesignTime;BeforeCompile;CoreCompile">
|
2020-10-23 15:25:16 +08:00
|
|
|
<ItemGroup>
|
|
|
|
<Compile Include="$(GeneratedGodotNupkgsVersionsFile)" />
|
|
|
|
<FileWrites Include="$(GeneratedGodotNupkgsVersionsFile)" />
|
|
|
|
</ItemGroup>
|
|
|
|
</Target>
|
|
|
|
<Target Name="_GenerateGodotNupkgsVersionsFile"
|
|
|
|
DependsOnTargets="SetPropertiesForGenerateGodotNupkgsVersions"
|
2021-03-06 07:12:42 +08:00
|
|
|
Inputs="$(MSBuildProjectFile);$(MSBuildThisFileDirectory);$(MSBuildProjectFile)\..\..\..\SdkPackageVersions.props"
|
2020-10-23 15:25:16 +08:00
|
|
|
Outputs="$(GeneratedGodotNupkgsVersionsFile)">
|
|
|
|
<PropertyGroup>
|
|
|
|
<GenerateGodotNupkgsVersionsCode><![CDATA[
|
2022-09-08 01:21:13 +08:00
|
|
|
namespace $(RootNamespace)
|
|
|
|
{
|
|
|
|
public class GeneratedGodotNupkgsVersions
|
|
|
|
{
|
2021-03-06 07:12:42 +08:00
|
|
|
public const string GodotNETSdk = "$(PackageVersion_Godot_NET_Sdk)"%3b
|
|
|
|
public const string GodotSourceGenerators = "$(PackageVersion_Godot_SourceGenerators)"%3b
|
2022-09-08 01:21:13 +08:00
|
|
|
public const string GodotSharp = "$(PackageVersion_GodotSharp)"%3b
|
2020-10-23 15:25:16 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]]></GenerateGodotNupkgsVersionsCode>
|
|
|
|
</PropertyGroup>
|
|
|
|
<WriteLinesToFile Lines="$(GenerateGodotNupkgsVersionsCode)"
|
|
|
|
File="$(GeneratedGodotNupkgsVersionsFile)"
|
|
|
|
Overwrite="True" WriteOnlyWhenDifferent="True" />
|
|
|
|
</Target>
|
|
|
|
</Project>
|