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