2019-03-29 15:55:59 +03:00
<Project Sdk= "Microsoft.NET.Sdk" >
2018-05-24 21:53:31 +03:00
2019-04-16 15:26:35 +03:00
<PropertyGroup >
<TargetFramework > net462</TargetFramework>
<UpdateAssemblyInfo > false</UpdateAssemblyInfo>
</PropertyGroup>
<ItemGroup >
<Content Include= "..\src\global.json" Link= "global.json" />
</ItemGroup>
<PropertyGroup Condition= "'$(BuildingInsideVisualStudio)'==''" >
<AppVersion > $(GITVERSION_FullSemVer)</AppVersion>
<NuGetBin > .\nuget\NuGet.exe</NuGetBin>
<OutputDir > $(BUILD_ARTIFACTSTAGINGDIRECTORY)</OutputDir>
<Configuration > $(CombinedConfiguration.Split('|')[0])</Configuration>
<Platform > $(CombinedConfiguration.Split('|')[1])</Platform>
2019-09-09 23:36:42 +03:00
<AppEnvironment Condition= "'$(CombinedConfiguration)' != '' and $(CombinedConfiguration.Split('|').Length) > 2" > $(CombinedConfiguration.Split('|')[2])</AppEnvironment>
2019-04-16 15:26:35 +03:00
<UpdateAssemblyInfo > false</UpdateAssemblyInfo>
<_isWindows > $([MSBuild]::IsOsPlatform(Windows))</_isWindows>
2020-01-31 16:11:30 +03:00
<!-- Disable automatic documentation generation as the step is executed explicitly through GenerateDoc -->
<BuildDocFx > false</BuildDocFx>
2019-04-16 15:26:35 +03:00
</PropertyGroup>
<ItemGroup >
<None Include= "..\src\Directory.Build.targets" Link= "Directory.Build.targets" />
</ItemGroup>
<ItemGroup >
2020-04-13 13:43:45 +03:00
<PackageReference Include= "docfx.console" Version= "2.52.0" GeneratePathProperty= "true" />
2019-04-16 15:26:35 +03:00
<PackageReference Include= "Microsoft.VisualStudio.TextTemplating.15.0" >
2019-10-25 17:22:51 +03:00
<Version > 16.3.29316.127</Version>
2019-04-16 15:26:35 +03:00
</PackageReference>
<PackageReference Include= "Microsoft.VisualStudio.TextTemplating.VSHost.14.0" >
<Version > 14.3.25407</Version>
</PackageReference>
<PackageReference Include= "MSBuildTasks" >
<Version > 1.5.0.235</Version>
</PackageReference>
<PackageReference Include= "NUnit.Runners" >
2020-02-17 13:42:57 +03:00
<Version > 3.11.1</Version>
2019-04-16 15:26:35 +03:00
</PackageReference>
</ItemGroup>
<Target Name= "UnoVSBuild" AfterTargets= "Build" Condition= "'$(BuildingInsideVisualStudio)'!=''" >
<Warning Text= "Building this project under Visual Studio has no effect." />
</Target>
<Target Name= "UnoBuild" AfterTargets= "Build" Condition= "'$(BuildingInsideVisualStudio)'==''" >
<Message Text= "Building for $(Configuration) and $(Platform) BuildReason:$(BUILD_REASON) Version:$(GitVersion_FullSemVer)" />
2019-10-05 13:03:17 +03:00
<!--
Use NuGet 4.3.0 or later for the restore
2018-05-24 21:53:31 +03:00
CI_Build environment is required for the restore to pickup the TargetFrameworksCI property in projects.
-->
2020-01-31 16:11:30 +03:00
<Exec Command= "set NUGET_RESTORE_MSBUILD_ARGS=/p:CI_Build=true & nuget\nuget.exe restore ..\src\Uno.UI.sln" Condition= "'$(AppEnvironment)'=='' and $(_isWindows) " />
2018-08-31 04:45:27 +03:00
2019-11-26 06:05:56 +03:00
<CallTarget Targets= "UpdateFileVersions;UpdateTasksSHA" Condition= "$(_isWindows)" />
2019-03-29 15:55:59 +03:00
2019-04-16 15:26:35 +03:00
<CallTarget Targets= "BuildCI" Condition= "'$(Configuration)'=='Release' and $(_isWindows)" />
<CallTarget Targets= "BuildCImacOS" Condition= "'$(Configuration)'=='Release' and !$(_isWindows)" />
2018-08-31 04:45:27 +03:00
2019-04-16 15:26:35 +03:00
<CallTarget Targets= "BuildNuGetPackage" Condition= "'$(Configuration)'=='Release'" />
<CallTarget Targets= "PublishVisx" Condition= "'$(Configuration)'=='Release' and $(_isWindows)" />
</Target>
2018-08-31 04:45:27 +03:00
2019-04-16 15:26:35 +03:00
<Target Name= "UpdateFileVersions" >
2018-08-31 04:45:27 +03:00
2019-11-29 14:55:59 +03:00
<XmlUpdate XmlFileName= "..\src\SolutionTemplate\UnoSolutionTemplate.VISX\source.extension.vsixmanifest"
XPath="/x:PackageManifest/x:Metadata/x:Identity/@Version"
Value="$(GITVERSION_MajorMinorPatch).$(GITVERSION_CommitsSinceVersionSource)"
Namespace="http://schemas.microsoft.com/developer/vsx-schema/2011"
Prefix="x" />
2019-09-09 23:36:42 +03:00
2019-11-29 14:55:59 +03:00
<ItemGroup >
<_PackageToUpdate Include= "Uno.UI" />
<_PackageToUpdate Include= "Uno.UI.RemoteControl" />
2020-04-27 15:36:27 +03:00
<_legacyProject Include= "..\src\SolutionTemplate\**\*.Droid.csproj" />
<_legacyProject Include= "..\src\SolutionTemplate\**\*.iOS.csproj" />
<_legacyProject Include= "..\src\SolutionTemplate\**\*.macOS.csproj" />
<_sdkProject Include= "..\src\SolutionTemplate\**\*.Wasm.csproj" />
<_sdkProject Include= "..\src\SolutionTemplate\UnoLibraryTemplate\CrossTargetedLibrary.csproj" />
2019-11-29 14:55:59 +03:00
</ItemGroup>
2020-04-27 15:36:27 +03:00
<XmlUpdate XmlFileName= "%(_legacyProject.Identity)"
XPath="//x:PackageReference[@Include='Uno.UI.RemoteControl']/@Version"
Value="$(GitVersion_FullSemVer)"
2019-11-29 14:55:59 +03:00
Namespace="http://schemas.microsoft.com/developer/msbuild/2003"
Prefix="x" />
2020-04-27 15:36:27 +03:00
<XmlUpdate XmlFileName= "%(_legacyProject.Identity)"
XPath="//x:PackageReference[@Include='Uno.UI']/@Version"
Value="$(GitVersion_FullSemVer)"
2019-11-29 14:55:59 +03:00
Namespace="http://schemas.microsoft.com/developer/msbuild/2003"
Prefix="x" />
2019-09-09 23:36:42 +03:00
2020-04-27 15:36:27 +03:00
<XmlUpdate XmlFileName= "%(_sdkProject.Identity)"
XPath="//PackageReference[@Include='Uno.UI']/@Version"
2019-11-29 14:55:59 +03:00
Value="$(GitVersion_FullSemVer)" />
2020-04-27 15:36:27 +03:00
<XmlUpdate XmlFileName= "%(_sdkProject.Identity)"
XPath="//PackageReference[@Include='Uno.UI.RemoteControl']/@Version"
2020-04-22 22:20:12 +03:00
Value="$(GitVersion_FullSemVer)" />
2019-04-16 15:26:35 +03:00
</Target>
2018-08-31 04:45:27 +03:00
2019-04-16 15:26:35 +03:00
<Target Name= "UpdateTasksSHA" >
2018-08-31 04:45:27 +03:00
2019-04-16 15:26:35 +03:00
<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>
2018-08-31 04:45:27 +03:00
2019-09-09 23:36:42 +03:00
<FileUpdate Files= "@(_Sha1Replace)" Regex= "v0" ReplacementText= "v$(GitVersion_Sha)" />
2018-08-31 04:45:27 +03:00
2019-04-16 15:26:35 +03:00
</Target>
2018-08-31 04:45:27 +03:00
2019-04-16 15:26:35 +03:00
<Target Name= "BuildCI" >
2019-04-16 16:19:45 +03:00
<Exec Command= "npm i" WorkingDirectory= "..\src\SamplesApp\SamplesApp.Wasm.UITests" />
2018-08-31 04:45:27 +03:00
2020-04-08 16:58:32 +03:00
<MSBuild Properties= "Configuration=Release_NoSamples;InformationalVersion=$(GITVERSION_InformationalVersion);CI_Build=true;_IsCIBuild=true;PackageOutputPath=$(BUILD_ARTIFACTSTAGINGDIRECTORY)\vslatest;PackageVersion=$(GITVERSION_FullSemVer)"
2019-03-29 15:07:31 +03:00
Projects="..\src\Uno.UI.sln"
2020-01-22 15:42:52 +03:00
Targets="Restore;Build"
2019-03-29 15:07:31 +03:00
RebaseOutputs="false"
2020-04-08 16:58:32 +03:00
BuildInParallel="false" />
2018-10-16 06:13:09 +03:00
2019-04-16 15:26:35 +03:00
</Target>
2018-10-16 06:13:09 +03:00
2019-04-16 15:26:35 +03:00
<Target Name= "GenerateDoc" >
2019-03-29 15:55:59 +03:00
2019-04-16 15:26:35 +03:00
<!-- Restore the nuget packages for the whole solution -->
2020-01-22 15:42:52 +03:00
<MSBuild Properties= "Configuration=Release;InformationalVersion=$(GITVERSION_InformationalVersion);CI_Build=true;_IsCIBuild=true" Projects= "..\src\Uno.UI.sln" Targets= "Restore" RebaseOutputs= "false" BuildInParallel= "true" />
2019-03-29 15:55:59 +03:00
2020-02-24 18:21:10 +03:00
<MSBuild Properties= "Configuration=Release" Projects= "..\src\Uno.UWPSyncGenerator\Uno.UWPSyncGenerator.csproj" Targets= "Restore;Build" />
2019-04-16 15:26:35 +03:00
<Exec Command= "..\src\Uno.UWPSyncGenerator\Bin\Release\net461\Uno.UWPSyncGenerator.exe "doc"" />
2019-10-17 02:32:00 +03:00
<Exec Command= "$(Pkgdocfx_console)\tools\docfx.exe ..\doc\docfx.json -o $(OutputDir)\doc" />
2019-04-16 15:26:35 +03:00
</Target>
2018-08-31 04:45:27 +03:00
2019-04-16 15:26:35 +03:00
<Target Name= "PublishVisx" >
2019-11-29 14:55:59 +03:00
<Copy SourceFiles= "..\src\SolutionTemplate\UnoSolutionTemplate.VISX\bin\Release\UnoSolutionTemplate.VSIX.vsix"
2019-11-30 00:07:42 +03:00
DestinationFiles="$(OutputDir)\vslatest\UnoPlatform-$(GITVERSION_FullSemVer).vsix" />
2019-04-16 15:26:35 +03:00
</Target>
2018-08-31 04:45:27 +03:00
2019-10-05 13:03:17 +03:00
<Target Name= "BuildNuGetPackage" >
2018-08-31 04:45:27 +03:00
2019-04-16 15:26:35 +03:00
<PropertyGroup >
<NugetNamespace > http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd</NugetNamespace>
</PropertyGroup>
2018-08-31 04:45:27 +03:00
2019-09-09 23:36:42 +03:00
<XmlUpdate XmlFileName= ".\Uno.UI.nuspec" XPath= "/x:package/x:metadata/x:dependencies/x:dependency/@version" Value= "$(GITVERSION_FullSemVer)" Namespace= "$(NugetNamespace)" Prefix= "x" />
<XmlUpdate XmlFileName= ".\Uno.UI.WpfHost.nuspec" XPath= "/x:package/x:metadata/x:dependencies//x:dependency[@id='Uno.UI']/@version" Value= "$(GITVERSION_FullSemVer)" Namespace= "$(NugetNamespace)" Prefix= "x" />
<XmlUpdate XmlFileName= ".\Uno.UI.Lottie.nuspec" XPath= "/x:package/x:metadata/x:dependencies//x:dependency[@id='Uno.UI']/@version" Value= "$(GITVERSION_FullSemVer)" Namespace= "$(NugetNamespace)" Prefix= "x" />
2019-03-19 17:50:44 +03:00
2019-10-25 22:25:31 +03:00
<XmlUpdate XmlFileName= ".\Uno.UI.RemoteControl.nuspec" XPath= "/x:package/x:metadata/x:dependencies//x:dependency[@id='Uno.UI']/@version" Value= "$(GITVERSION_FullSemVer)" Namespace= "$(NugetNamespace)" Prefix= "x" />
2019-04-16 15:26:35 +03:00
<!-- Create the packages -->
<Exec Command= "$(NuGetBin) pack Uno.UI.nuspec -Verbosity Detailed -Version "$(GITVERSION_FullSemVer)"" />
<Exec Command= "$(NuGetBin) pack Uno.UI.WpfHost.nuspec -Verbosity Detailed -Version "$(GITVERSION_FullSemVer)"" />
<Exec Command= "$(NuGetBin) pack Uno.UI.Lottie.nuspec -Verbosity Detailed -Version "$(GITVERSION_FullSemVer)"" />
2019-10-25 22:25:31 +03:00
<Exec Command= "$(NuGetBin) pack Uno.UI.RemoteControl.nuspec -Verbosity Detailed -Version "$(GITVERSION_FullSemVer)"" />
2019-04-16 15:26:35 +03:00
</Target>
2018-08-31 04:45:27 +03:00
2019-04-16 15:26:35 +03:00
<Target Name= "ValidatePackage" AfterTargets= "UnoBuild" Condition= "'$(BuildingInsideVisualStudio)'==''" >
2020-03-24 22:59:49 +03:00
<Exec Command= "dotnet tool install --global Uno.PackageDiff --version 1.0.0-dev.32" IgnoreExitCode= "true" />
2019-04-16 15:26:35 +03:00
<Exec Command= "generatepkgdiff --base=Uno.UI --other=Uno.UI.$(GITVERSION_FullSemVer).nupkg --diffignore=PackageDiffIgnore.xml --outfile=$(OutputDir)\ApiDiff.$(GITVERSION_FullSemVer).md" />
</Target>
2019-03-25 04:54:59 +03:00
2018-07-10 20:23:32 +03:00
</Project>