2020-10-23 09:25:16 +02: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-28 23:25:16 +01:00
|
|
|
DependsOnTargets="_GenerateGodotNupkgsVersionsFile"
|
|
|
|
BeforeTargets="PrepareForBuild;CompileDesignTime;BeforeCompile;CoreCompile">
|
2020-10-23 09:25:16 +02:00
|
|
|
<ItemGroup>
|
|
|
|
<Compile Include="$(GeneratedGodotNupkgsVersionsFile)" />
|
|
|
|
<FileWrites Include="$(GeneratedGodotNupkgsVersionsFile)" />
|
|
|
|
</ItemGroup>
|
|
|
|
</Target>
|
|
|
|
<Target Name="_GenerateGodotNupkgsVersionsFile"
|
|
|
|
DependsOnTargets="SetPropertiesForGenerateGodotNupkgsVersions"
|
2021-03-06 00:12:42 +01:00
|
|
|
Inputs="$(MSBuildProjectFile);$(MSBuildThisFileDirectory);$(MSBuildProjectFile)\..\..\..\SdkPackageVersions.props"
|
2020-10-23 09:25:16 +02:00
|
|
|
Outputs="$(GeneratedGodotNupkgsVersionsFile)">
|
|
|
|
<PropertyGroup>
|
|
|
|
<GenerateGodotNupkgsVersionsCode><![CDATA[
|
|
|
|
namespace $(RootNamespace) {
|
|
|
|
public class GeneratedGodotNupkgsVersions {
|
2021-03-06 00:12:42 +01:00
|
|
|
public const string GodotNETSdk = "$(PackageVersion_Godot_NET_Sdk)"%3b
|
|
|
|
public const string GodotSourceGenerators = "$(PackageVersion_Godot_SourceGenerators)"%3b
|
2020-10-23 09:25:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]]></GenerateGodotNupkgsVersionsCode>
|
|
|
|
</PropertyGroup>
|
|
|
|
<WriteLinesToFile Lines="$(GenerateGodotNupkgsVersionsCode)"
|
|
|
|
File="$(GeneratedGodotNupkgsVersionsFile)"
|
|
|
|
Overwrite="True" WriteOnlyWhenDifferent="True" />
|
|
|
|
</Target>
|
|
|
|
</Project>
|