-
Notifications
You must be signed in to change notification settings - Fork 747
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #163 from nventive/dev/jela/tasks-ambiguity
Include SHA1 in Uno.UI.Tasks msbuild tasks
- Loading branch information
Showing
5 changed files
with
190 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,135 +1,150 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\PreEmptive\Dotfuscator\4\PreEmptive.Dotfuscator.Targets" Condition="Exists('$(MSBuildExtensionsPath)\PreEmptive\Dotfuscator\4\PreEmptive.Dotfuscator.Targets')"/> | ||
<Import Project="$(MSBuildExtensionsPath)\PreEmptive\Dotfuscator\4\PreEmptive.Dotfuscator.Targets" Condition="Exists('$(MSBuildExtensionsPath)\PreEmptive\Dotfuscator\4\PreEmptive.Dotfuscator.Targets')"/> | ||
|
||
<PropertyGroup> | ||
<AppVersion>$(GITVERSION_FullSemVer)</AppVersion> | ||
<NuGetBin>.\nuget\NuGet.exe</NuGetBin> | ||
<OutputDir>$(BUILD_ARTIFACTSTAGINGDIRECTORY)</OutputDir> | ||
<Configuration>$(CombinedConfiguration.Split('|')[0])</Configuration> | ||
<Platform>$(CombinedConfiguration.Split('|')[1])</Platform> | ||
<AppEnvironment Condition="'$(CombinedConfiguration)' != '' and $(CombinedConfiguration.Split('|').Length) > 2">$(CombinedConfiguration.Split('|')[2])</AppEnvironment> | ||
|
||
<UpdateAssemblyInfo>false</UpdateAssemblyInfo> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<AppVersion>$(GITVERSION_FullSemVer)</AppVersion> | ||
|
||
<NuGetBin>.\nuget\NuGet.exe</NuGetBin> | ||
<OutputDir>$(BUILD_ARTIFACTSTAGINGDIRECTORY)</OutputDir> | ||
<Configuration>$(CombinedConfiguration.Split('|')[0])</Configuration> | ||
<Platform>$(CombinedConfiguration.Split('|')[1])</Platform> | ||
<AppEnvironment Condition="'$(CombinedConfiguration)' != '' and $(CombinedConfiguration.Split('|').Length) > 2">$(CombinedConfiguration.Split('|')[2])</AppEnvironment> | ||
|
||
<UpdateAssemblyInfo>false</UpdateAssemblyInfo> | ||
</PropertyGroup> | ||
|
||
<Import Project=".\obj\Uno.UI.Build.csproj.nuget.g.props"/> | ||
<Import Project=".\obj\Uno.UI.Build.csproj.nuget.g.targets"/> | ||
|
||
<Target Name="Build" DependsOnTargets="GetVersion;UpdateFileVersions"> | ||
<Message Text="Buidling for $(Configuration) and $(Platform) BuildReason:$(BUILD_REASON) Version:$(GitVersion_FullSemVer) Obfuscation:$(RunObfuscation)" /> | ||
<Target Name="Build" DependsOnTargets="GetVersion;UpdateFileVersions;UpdateTasksSHA"> | ||
<Message Text="Buidling for $(Configuration) and $(Platform) BuildReason:$(BUILD_REASON) Version:$(GitVersion_FullSemVer) Obfuscation:$(RunObfuscation)" /> | ||
|
||
<!-- | ||
<!-- | ||
Use NuGet 4.3.0 or later for the restore | ||
CI_Build environment is required for the restore to pickup the TargetFrameworksCI property in projects. | ||
--> | ||
<Exec Command="set NUGET_RESTORE_MSBUILD_ARGS=/p:CI_Build=true & nuget\nuget.exe restore ..\src\Uno.UI.sln" Condition="'$(AppEnvironment)'=='' " /> | ||
|
||
<CallTarget Targets="BuildCI" Condition="'$(Configuration)'=='Release'" /> | ||
|
||
<CallTarget Targets="BuildNuGetPackage" Condition="'$(Configuration)'=='Release'" /> | ||
<CallTarget Targets="PublishVisx" Condition="'$(Configuration)'=='Release'" /> | ||
<CallTarget Targets="GenerateAPIDiff" Condition="'$(Configuration)'=='Release'" /> | ||
</Target> | ||
|
||
<Target Name="UpdateFileVersions"> | ||
|
||
<XmlUpdate | ||
XmlFileName="..\src\SolutionTemplate\UnoSolutionTemplate.VISX\source.extension.vsixmanifest" | ||
XPath="/x:PackageManifest/x:Metadata/x:Identity/@Version" | ||
Value="$(GITVERSION_MajorMinorPatch)" | ||
Namespace="http://schemas.microsoft.com/developer/vsx-schema/2011" | ||
Prefix="x"/> | ||
|
||
<XmlUpdate | ||
XmlFileName="..\src\SolutionTemplate\UnoSolutionTemplate\UnoQuickStart.Droid\UnoQuickStart.Droid.csproj" | ||
XPath="//x:PackageReference[@Include='Uno.UI']/@Version" | ||
Value="$(GitVersion_FullSemVer)" | ||
Namespace="http://schemas.microsoft.com/developer/msbuild/2003" | ||
Prefix="x"/> | ||
|
||
<XmlUpdate | ||
XmlFileName="..\src\SolutionTemplate\UnoSolutionTemplate\UnoQuickStart.iOS\UnoQuickStart.iOS.csproj" | ||
XPath="//x:PackageReference[@Include='Uno.UI']/@Version" | ||
Value="$(GitVersion_FullSemVer)" | ||
Namespace="http://schemas.microsoft.com/developer/msbuild/2003" | ||
Prefix="x"/> | ||
|
||
<XmlUpdate | ||
XmlFileName="..\src\SolutionTemplate\UnoSolutionTemplate\UnoQuickStart.Wasm\UnoQuickStart.Wasm.csproj" | ||
XPath="//PackageReference[@Include='Uno.UI']/@Version" | ||
Value="$(GitVersion_FullSemVer)" /> | ||
|
||
<XmlUpdate | ||
XmlFileName="..\src\SolutionTemplate\UnoLibraryTemplate\CrossTargetedLibrary.csproj" | ||
XPath="//PackageReference[@Include='Uno.UI']/@Version" | ||
Value="$(GitVersion_FullSemVer)" /> | ||
|
||
</Target> | ||
|
||
<Target Name="BuildCI"> | ||
|
||
<MSBuild Properties="Configuration=Release;VisualStudioVersion=15.0;CopyDSYM=False;InformationalVersion=$(GITVERSION_InformationalVersion);CI_Build=true;_IsCIBuild=true" | ||
Projects="..\src\Uno.UI.sln" | ||
Targets="Build" | ||
RebaseOutputs="false" | ||
BuildInParallel="true" /> | ||
|
||
</Target> | ||
|
||
<Target Name="GenerateDoc"> | ||
<Exec Command="$(NuGetPackageRoot)\docfx.console\2.36.0\tools\docfx.exe ..\doc\docfx.json -o $(OutputDir)\doc" /> | ||
</Target> | ||
|
||
<Target Name="GenerateAPIDiff"> | ||
<PropertyGroup> | ||
<WindowsDefinition>C:\Program Files (x86)\Windows Kits\10\References\Windows.Foundation.UniversalApiContract\2.0.0.0\Windows.Foundation.UniversalApiContract.winmd</WindowsDefinition> | ||
<iOS_UnoUIDefinition>..\src\Uno.UI\bin\release\xamarinios10\Uno.UI.dll</iOS_UnoUIDefinition> | ||
<Android_UnoUIDefinition>..\src\Uno.UI\bin\release\Monoandroid80\Uno.UI.dll</Android_UnoUIDefinition> | ||
<Wasm_UnoUIDefinition>..\src\Uno.UI\bin\release\netstandard2.0\Uno.UI.dll</Wasm_UnoUIDefinition> | ||
</PropertyGroup> | ||
|
||
<Exec Command="..\src\Uno.UI.AssemblyComparer\Bin\Release\Uno.UI.AssemblyComparer.exe "$(iOS_UnoUIDefinition)" "$(WindowsDefinition)" "output.txt"" /> | ||
<Exec Command="copy .\output.txt "$(OutputDir)\iOS_API_Diff.txt"" /> | ||
|
||
<Exec Command="..\src\Uno.UI.AssemblyComparer\Bin\Release\Uno.UI.AssemblyComparer.exe "$(Android_UnoUIDefinition)" "$(WindowsDefinition)" "output.txt"" /> | ||
<Exec Command="copy .\output.txt "$(OutputDir)\Android_API_Diff.txt"" /> | ||
|
||
<Exec Command="..\src\Uno.UI.AssemblyComparer\Bin\Release\Uno.UI.AssemblyComparer.exe "$(Wasm_UnoUIDefinition)" "$(WindowsDefinition)" "output.txt"" /> | ||
<Exec Command="copy .\output.txt "$(OutputDir)\Wasm_API_Diff.txt"" /> | ||
</Target> | ||
<Exec Command="set NUGET_RESTORE_MSBUILD_ARGS=/p:CI_Build=true & nuget\nuget.exe restore ..\src\Uno.UI.sln" Condition="'$(AppEnvironment)'=='' " /> | ||
|
||
<CallTarget Targets="BuildCI" Condition="'$(Configuration)'=='Release'" /> | ||
|
||
<CallTarget Targets="BuildNuGetPackage" Condition="'$(Configuration)'=='Release'" /> | ||
<CallTarget Targets="PublishVisx" Condition="'$(Configuration)'=='Release'" /> | ||
<CallTarget Targets="GenerateAPIDiff" Condition="'$(Configuration)'=='Release'" /> | ||
</Target> | ||
|
||
<Target Name="UpdateFileVersions"> | ||
|
||
<XmlUpdate | ||
XmlFileName="..\src\SolutionTemplate\UnoSolutionTemplate.VISX\source.extension.vsixmanifest" | ||
XPath="/x:PackageManifest/x:Metadata/x:Identity/@Version" | ||
Value="$(GITVERSION_MajorMinorPatch)" | ||
Namespace="http://schemas.microsoft.com/developer/vsx-schema/2011" | ||
Prefix="x"/> | ||
|
||
<XmlUpdate | ||
XmlFileName="..\src\SolutionTemplate\UnoSolutionTemplate\UnoQuickStart.Droid\UnoQuickStart.Droid.csproj" | ||
XPath="//x:PackageReference[@Include='Uno.UI']/@Version" | ||
Value="$(GitVersion_FullSemVer)" | ||
Namespace="http://schemas.microsoft.com/developer/msbuild/2003" | ||
Prefix="x"/> | ||
|
||
<XmlUpdate | ||
XmlFileName="..\src\SolutionTemplate\UnoSolutionTemplate\UnoQuickStart.iOS\UnoQuickStart.iOS.csproj" | ||
XPath="//x:PackageReference[@Include='Uno.UI']/@Version" | ||
Value="$(GitVersion_FullSemVer)" | ||
Namespace="http://schemas.microsoft.com/developer/msbuild/2003" | ||
Prefix="x"/> | ||
|
||
<XmlUpdate | ||
XmlFileName="..\src\SolutionTemplate\UnoSolutionTemplate\UnoQuickStart.Wasm\UnoQuickStart.Wasm.csproj" | ||
XPath="//PackageReference[@Include='Uno.UI']/@Version" | ||
Value="$(GitVersion_FullSemVer)" /> | ||
|
||
<XmlUpdate | ||
XmlFileName="..\src\SolutionTemplate\UnoLibraryTemplate\CrossTargetedLibrary.csproj" | ||
XPath="//PackageReference[@Include='Uno.UI']/@Version" | ||
Value="$(GitVersion_FullSemVer)" /> | ||
|
||
</Target> | ||
|
||
<Target Name="UpdateTasksSHA"> | ||
|
||
<ItemGroup> | ||
<_Sha1Replace Include="..\src\SourceGenerators\Uno.UI.Tasks\Uno.UI.Tasks.csproj" /> | ||
<_Sha1Replace Include="..\src\SourceGenerators\Uno.UI.Tasks\Assets\RetargetAssets.cs" /> | ||
<_Sha1Replace Include="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks.targets" /> | ||
<_Sha1Replace Include="..\src\SourceGenerators\Uno.UI.Tasks\ResourcesGenerator\ResourcesGenerationTask.cs" /> | ||
</ItemGroup> | ||
|
||
<FileUpdate Files="@(_Sha1Replace)" | ||
Regex="v0" | ||
ReplacementText="v$(GitVersion_Sha)" /> | ||
|
||
</Target> | ||
|
||
<Target Name="BuildCI"> | ||
|
||
<MSBuild Properties="Configuration=Release;VisualStudioVersion=15.0;CopyDSYM=False;InformationalVersion=$(GITVERSION_InformationalVersion);CI_Build=true;_IsCIBuild=true" | ||
Projects="..\src\Uno.UI.sln" | ||
Targets="Build" | ||
RebaseOutputs="false" | ||
BuildInParallel="true" /> | ||
|
||
</Target> | ||
|
||
<Target Name="GenerateDoc"> | ||
<Exec Command="$(NuGetPackageRoot)\docfx.console\2.36.0\tools\docfx.exe ..\doc\docfx.json -o $(OutputDir)\doc" /> | ||
</Target> | ||
|
||
<Target Name="GenerateAPIDiff"> | ||
<PropertyGroup> | ||
<WindowsDefinition>C:\Program Files (x86)\Windows Kits\10\References\Windows.Foundation.UniversalApiContract\2.0.0.0\Windows.Foundation.UniversalApiContract.winmd</WindowsDefinition> | ||
<iOS_UnoUIDefinition>..\src\Uno.UI\bin\release\xamarinios10\Uno.UI.dll</iOS_UnoUIDefinition> | ||
<Android_UnoUIDefinition>..\src\Uno.UI\bin\release\Monoandroid80\Uno.UI.dll</Android_UnoUIDefinition> | ||
<Wasm_UnoUIDefinition>..\src\Uno.UI\bin\release\netstandard2.0\Uno.UI.dll</Wasm_UnoUIDefinition> | ||
</PropertyGroup> | ||
|
||
<Exec Command="..\src\Uno.UI.AssemblyComparer\Bin\Release\Uno.UI.AssemblyComparer.exe "$(iOS_UnoUIDefinition)" "$(WindowsDefinition)" "output.txt"" /> | ||
<Exec Command="copy .\output.txt "$(OutputDir)\iOS_API_Diff.txt"" /> | ||
|
||
<Exec Command="..\src\Uno.UI.AssemblyComparer\Bin\Release\Uno.UI.AssemblyComparer.exe "$(Android_UnoUIDefinition)" "$(WindowsDefinition)" "output.txt"" /> | ||
<Exec Command="copy .\output.txt "$(OutputDir)\Android_API_Diff.txt"" /> | ||
|
||
<Exec Command="..\src\Uno.UI.AssemblyComparer\Bin\Release\Uno.UI.AssemblyComparer.exe "$(Wasm_UnoUIDefinition)" "$(WindowsDefinition)" "output.txt"" /> | ||
<Exec Command="copy .\output.txt "$(OutputDir)\Wasm_API_Diff.txt"" /> | ||
</Target> | ||
|
||
<Target Name="PublishVisx"> | ||
<Copy SourceFiles="..\src\SolutionTemplate\UnoSolutionTemplate.VISX\bin\Release\UnoSolutionTemplate.vsix" | ||
DestinationFiles="$(OutputDir)\UnoPlatform-$(GITVERSION_FullSemVer).vsix" /> | ||
</Target> | ||
|
||
<Target Name="BuildNuGetPackage" DependsOnTargets="_FillMsBuildVersion"> | ||
|
||
<PropertyGroup> | ||
<NugetNamespace>http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd</NugetNamespace> | ||
</PropertyGroup> | ||
|
||
<XmlUpdate | ||
XmlFileName=".\Uno.UI.nuspec" | ||
XPath="/x:package/x:metadata/x:version" | ||
Value="$(GITVERSION_FullSemVer)" | ||
Namespace="$(NugetNamespace)" | ||
Prefix="x"/> | ||
|
||
<XmlUpdate | ||
XmlFileName=".\Uno.UI.nuspec" | ||
XPath="/x:package/x:metadata/x:dependencies/x:dependency/@version" | ||
Value="$(GITVERSION_FullSemVer)" | ||
Namespace="$(NugetNamespace)" | ||
Prefix="x"/> | ||
|
||
<!-- Create the packages --> | ||
<Exec Command="$(NuGetBin) pack Uno.UI.nuspec -Verbosity Detailed" /> | ||
</Target> | ||
|
||
<Import Project="GetMsBuildVersion.targets" /> | ||
<Copy SourceFiles="..\src\SolutionTemplate\UnoSolutionTemplate.VISX\bin\Release\UnoSolutionTemplate.vsix" | ||
DestinationFiles="$(OutputDir)\UnoPlatform-$(GITVERSION_FullSemVer).vsix" /> | ||
</Target> | ||
|
||
<Target Name="BuildNuGetPackage" DependsOnTargets="_FillMsBuildVersion"> | ||
|
||
<PropertyGroup> | ||
<NugetNamespace>http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd</NugetNamespace> | ||
</PropertyGroup> | ||
|
||
<XmlUpdate | ||
XmlFileName=".\Uno.UI.nuspec" | ||
XPath="/x:package/x:metadata/x:version" | ||
Value="$(GITVERSION_FullSemVer)" | ||
Namespace="$(NugetNamespace)" | ||
Prefix="x"/> | ||
|
||
<XmlUpdate | ||
XmlFileName=".\Uno.UI.nuspec" | ||
XPath="/x:package/x:metadata/x:dependencies/x:dependency/@version" | ||
Value="$(GITVERSION_FullSemVer)" | ||
Namespace="$(NugetNamespace)" | ||
Prefix="x"/> | ||
|
||
<!-- Create the packages --> | ||
<Exec Command="$(NuGetBin) pack Uno.UI.nuspec -Verbosity Detailed" /> | ||
</Target> | ||
|
||
<Import Project="GetMsBuildVersion.targets" /> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.