forked from unoplatform/uno
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Uno.UI.Build.csproj
334 lines (263 loc) · 23.9 KB
/
Uno.UI.Build.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
<Project Sdk="Microsoft.NET.Sdk">
<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>
<AppEnvironment Condition="'$(CombinedConfiguration)' != '' and $(CombinedConfiguration.Split('|').Length) > 2">$(CombinedConfiguration.Split('|')[2])</AppEnvironment>
<UpdateAssemblyInfo>false</UpdateAssemblyInfo>
<_isWindows>$([MSBuild]::IsOsPlatform(Windows))</_isWindows>
<!-- Disable automatic documentation generation as the step is executed explicitly through GenerateDoc -->
<BuildDocFx>false</BuildDocFx>
</PropertyGroup>
<ItemGroup>
<None Include="..\src\Directory.Build.targets" Link="Directory.Build.targets" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="docfx.console" Version="2.56.4" GeneratePathProperty="true" />
<PackageReference Include="MSBuildTasks">
<Version>1.5.0.235</Version>
</PackageReference>
<PackageReference Include="NUnit.Runners">
<Version>3.11.1</Version>
</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) UNO_UWP_BUILD:$(UNO_UWP_BUILD)" />
<CallTarget Targets="UpdateFileVersions;UpdateTasksSHA;PrepareNuGetPackage" Condition="$(_isWindows)" />
<CallTarget Targets="RunAPISyncTool" Condition="'$(UNO_UWP_BUILD)'=='false'" />
<CallTarget Targets="BuildCI" Condition="'$(Configuration)'=='Release' and $(_isWindows)" />
<CallTarget Targets="BuildCImacOS" Condition="'$(Configuration)'=='Release' and !$(_isWindows)" />
<CallTarget Targets="BuildNuGetPackage" Condition="'$(Configuration)'=='Release'" />
<CallTarget Targets="PublishVisx" Condition="'$(Configuration)'=='Release' and $(_isWindows)" />
</Target>
<Target Name="UpdateFileVersions">
<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" />
<ItemGroup>
<_PackageToUpdate Include="Uno.UI" />
<_PackageToUpdate Include="Uno.UI.RemoteControl" />
<_legacyProject Include="..\src\SolutionTemplate\**\*.Uwp.csproj"/>
<_legacyProject Include="..\src\SolutionTemplate\**\*.Droid.csproj"/>
<_legacyProject Include="..\src\SolutionTemplate\**\*.iOS.csproj"/>
<_legacyProject Include="..\src\SolutionTemplate\**\*.macOS.csproj"/>
<_legacyProject Include="..\src\SolutionTemplate\**\*.Wpf.Host.csproj"/>
<_sdkProject Include="..\src\SolutionTemplate\**\*.Wasm.csproj"/>
<_sdkProject Include="..\src\SolutionTemplate\**\*.Skia.*.csproj"/>
<_sdkProject Include="..\src\SolutionTemplate\UnoLibraryTemplate\CrossTargetedLibrary.csproj"/>
<_sdkProject Include="..\src\SolutionTemplate\UnoLibraryTemplate\CrossTargetedLibrary.csproj"/>
<_sdkProject Include="..\src\SolutionTemplate\Uno.ProjectTemplates.Dotnet\content\unolib-crossruntime\UnoCrossRuntimeLib\*.csproj"/>
</ItemGroup>
<XmlUpdate XmlFileName="%(_legacyProject.Identity)"
XPath="//x:PackageReference[@Include='Uno.UI.RemoteControl']/@Version"
Value="$(GitVersion_FullSemVer)"
Namespace="http://schemas.microsoft.com/developer/msbuild/2003"
Prefix="x" />
<XmlUpdate XmlFileName="%(_legacyProject.Identity)"
XPath="//x:PackageReference[@Include='Uno.UI']/@Version"
Value="$(GitVersion_FullSemVer)"
Namespace="http://schemas.microsoft.com/developer/msbuild/2003"
Prefix="x" />
<XmlUpdate XmlFileName="%(_sdkProject.Identity)"
XPath="//PackageReference[@Include='Uno.UI']/@Version"
Value="$(GitVersion_FullSemVer)" />
<XmlUpdate XmlFileName="%(_sdkProject.Identity)"
XPath="//PackageReference[@Include='Uno.UI.RemoteControl']/@Version"
Value="$(GitVersion_FullSemVer)" />
<XmlUpdate XmlFileName="%(_sdkProject.Identity)"
XPath="//PackageReference[@Include='Uno.UI.WebAssembly']/@Version"
Value="$(GitVersion_FullSemVer)" />
<XmlUpdate XmlFileName="%(_sdkProject.Identity)"
XPath="//PackageReference[@Include='Uno.UI.Skia.Gtk']/@Version"
Value="$(GitVersion_FullSemVer)" />
<XmlUpdate XmlFileName="%(_sdkProject.Identity)"
XPath="//PackageReference[@Include='Uno.UI.Skia.Wpf']/@Version"
Value="$(GitVersion_FullSemVer)" />
<XmlUpdate XmlFileName="%(_sdkProject.Identity)"
XPath="//PackageReference[@Include='Uno.UI.Skia.Tizen']/@Version"
Value="$(GitVersion_FullSemVer)" />
<XmlUpdate XmlFileName="%(_sdkProject.Identity)"
XPath="//PackageReference[@Include='Uno.UI.Runtime.WebAssembly']/@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">
<Exec Command="npm i" WorkingDirectory="..\src\SamplesApp\SamplesApp.Wasm.UITests" />
<MSBuild Properties="Configuration=Release_NoSamples;InformationalVersion=$(GITVERSION_InformationalVersion);CI_Build=true;_IsCIBuild=true;PackageOutputPath=$(BUILD_ARTIFACTSTAGINGDIRECTORY)\vslatest;PackageVersion=$(GITVERSION_FullSemVer)"
Projects="..\src\Uno.UI.sln"
Targets="Restore;Build"
RebaseOutputs="false"
BuildInParallel="true" />
</Target>
<Target Name="BuildSyncGenerator">
<!-- Restore the nuget packages for the whole solution -->
<MSBuild Properties="Configuration=Release;InformationalVersion=$(GITVERSION_InformationalVersion);CI_Build=true;_IsCIBuild=true" Projects="..\src\Uno.UI.sln" Targets="Restore" RebaseOutputs="false" BuildInParallel="true" />
<MSBuild Properties="Configuration=Release" Projects="..\src\Uno.UWPSyncGenerator\Uno.UWPSyncGenerator.csproj" Targets="Restore;Build" />
<ItemGroup>
<MixinTargetFrameworks Include="xamarinios10" />
<MixinTargetFrameworks Include="monoandroid10.0" />
<MixinTargetFrameworks Include="xamarinmac20" />
<MixinTargetFrameworks Include="net461" />
<MixinTargetFrameworks Include="netstandard2.0" />
</ItemGroup>
<MSBuild Properties="Configuration=Release;InformationalVersion=$(GITVERSION_InformationalVersion);CI_Build=true;_IsCIBuild=true"
Projects="..\src\T4Generator\T4Generator.csproj"
Targets="Build"
RebaseOutputs="false"
BuildInParallel="true" />
<MSBuild Properties="Configuration=Release;InformationalVersion=$(GITVERSION_InformationalVersion);CI_Build=true;_IsCIBuild=true;TargetFramework=%(MixinTargetFrameworks.Identity)"
Projects="..\src\Uno.UI\Uno.UI.csproj"
Targets="GenerateMixins"
RebaseOutputs="false"
BuildInParallel="true" />
</Target>
<Target Name="GenerateDoc" DependsOnTargets="BuildSyncGenerator">
<Exec Command="..\src\Uno.UWPSyncGenerator\Bin\Release\Uno.UWPSyncGenerator.exe "doc"" />
<Exec Command="$(Pkgdocfx_console)\tools\docfx.exe ..\doc\docfx.json -o $(OutputDir)\doc" />
</Target>
<Target Name="RunAPISyncTool" DependsOnTargets="BuildSyncGenerator">
<Exec Command="..\src\Uno.UWPSyncGenerator\Bin\Release\Uno.UWPSyncGenerator.exe "sync"" />
</Target>
<Target Name="PublishVisx" Condition="'$(UNO_UWP_BUILD)'=='true'">
<Copy SourceFiles="..\src\SolutionTemplate\UnoSolutionTemplate.VISX\bin\Release\UnoSolutionTemplate.VSIX.vsix"
DestinationFiles="$(OutputDir)\vslatest\UnoPlatform-$(GITVERSION_FullSemVer).vsix" />
</Target>
<Target Name="PrepareNuGetPackage">
<PropertyGroup>
<NugetNamespace>http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd</NugetNamespace>
<PackageNamePrefix>Uno.WinUI</PackageNamePrefix>
<PackageNamePrefix Condition="'$(UNO_UWP_BUILD)'=='true'">Uno.UI</PackageNamePrefix>
</PropertyGroup>
<ItemGroup>
<_NuspecFiles Include=".\Uno.WinUI.nuspec" />
<_NuspecFiles Include=".\Uno.WinUI.Lottie.nuspec" />
<_NuspecFiles Include=".\Uno.WinUI.RemoteControl.nuspec" />
<_NuspecFiles Include=".\Uno.WinUI.Skia.Gtk.nuspec" />
<_NuspecFiles Include=".\Uno.WinUI.Skia.Wpf.nuspec" />
<_NuspecFiles Include=".\Uno.WinUI.Skia.Tizen.nuspec" />
<_NuspecFiles Include=".\Uno.WinUI.WebAssembly.nuspec" />
</ItemGroup>
<!-- Update the package version -->
<XmlUpdate XmlFileName="%(_NuspecFiles.Identity)" XPath="/x:package/x:metadata/x:dependencies/x:dependency/@version" Value="$(GITVERSION_FullSemVer)" Namespace="$(NugetNamespace)" Prefix="x" />
<!-- Update Uno.WinUI references version -->
<XmlUpdate XmlFileName="%(_NuspecFiles.Identity)" XPath="/x:package/x:metadata/x:dependencies//x:dependency[@id='Uno.WinUI']/@version" Value="$(GITVERSION_FullSemVer)" Namespace="$(NugetNamespace)" Prefix="x" />
<!-- Update Uno.Foundation.Runtime.WebAssembly references version -->
<XmlUpdate XmlFileName="%(_NuspecFiles.Identity)" XPath="/x:package/x:metadata/x:dependencies//x:dependency[@id='Uno.Foundation.Runtime.WebAssembly']/@version" Value="$(GITVERSION_FullSemVer)" Namespace="$(NugetNamespace)" Prefix="x" />
<!-- Update Uno.Foundation.Runtime.WebAssembly references version -->
<XmlUpdate XmlFileName="%(_NuspecFiles.Identity)" XPath="/x:package/x:metadata/x:dependencies//x:dependency[@id='Uno.WinUI.Runtime.WebAssembly']/@version" Value="$(GITVERSION_FullSemVer)" Namespace="$(NugetNamespace)" Prefix="x" />
<!-- Update Uno.WinUI.Runtime.Skia.Gtk references version -->
<XmlUpdate XmlFileName="%(_NuspecFiles.Identity)" XPath="/x:package/x:metadata/x:dependencies//x:dependency[@id='Uno.WinUI.Runtime.Skia.Gtk']/@version" Value="$(GITVERSION_FullSemVer)" Namespace="$(NugetNamespace)" Prefix="x" />
<!-- Update Uno.WinUI.Runtime.Skia.Wpf references version -->
<XmlUpdate XmlFileName="%(_NuspecFiles.Identity)" XPath="/x:package/x:metadata/x:dependencies//x:dependency[@id='Uno.WinUI.Runtime.Skia.Wpf']/@version" Value="$(GITVERSION_FullSemVer)" Namespace="$(NugetNamespace)" Prefix="x" />
<!-- Update Uno.WinUI.Runtime.Skia.Tizen references version -->
<XmlUpdate XmlFileName="%(_NuspecFiles.Identity)" XPath="/x:package/x:metadata/x:dependencies//x:dependency[@id='Uno.WinUI.Runtime.Skia.Tizen']/@version" Value="$(GITVERSION_FullSemVer)" Namespace="$(NugetNamespace)" Prefix="x" />
<!-- Update package ID based on WinUI / UWP source tree -->
<XmlUpdate XmlFileName=".\Uno.WinUI.nuspec" XPath="/x:package/x:metadata/x:id" Value="$(PackageNamePrefix)" Namespace="$(NugetNamespace)" Prefix="x" />
<XmlUpdate XmlFileName=".\Uno.WinUI.Lottie.nuspec" XPath="/x:package/x:metadata/x:id" Value="$(PackageNamePrefix).Lottie" Namespace="$(NugetNamespace)" Prefix="x" />
<XmlUpdate XmlFileName=".\Uno.WinUI.RemoteControl.nuspec" XPath="/x:package/x:metadata/x:id" Value="$(PackageNamePrefix).RemoteControl" Namespace="$(NugetNamespace)" Prefix="x" />
<XmlUpdate XmlFileName=".\Uno.WinUI.Skia.Gtk.nuspec" XPath="/x:package/x:metadata/x:id" Value="$(PackageNamePrefix).Skia.Gtk" Namespace="$(NugetNamespace)" Prefix="x" />
<XmlUpdate XmlFileName=".\Uno.WinUI.Skia.Wpf.nuspec" XPath="/x:package/x:metadata/x:id" Value="$(PackageNamePrefix).Skia.Wpf" Namespace="$(NugetNamespace)" Prefix="x" />
<XmlUpdate XmlFileName=".\Uno.WinUI.Skia.Tizen.nuspec" XPath="/x:package/x:metadata/x:id" Value="$(PackageNamePrefix).Skia.Tizen" Namespace="$(NugetNamespace)" Prefix="x" />
<XmlUpdate XmlFileName=".\Uno.WinUI.WebAssembly.nuspec" XPath="/x:package/x:metadata/x:id" Value="$(PackageNamePrefix).WebAssembly" Namespace="$(NugetNamespace)" Prefix="x" />
<!-- Update package Title based on WinUI / UWP source tree -->
<XmlUpdate XmlFileName=".\Uno.WinUI.nuspec" XPath="/x:package/x:metadata/x:title" Value="$(PackageNamePrefix)" Namespace="$(NugetNamespace)" Prefix="x" />
<XmlUpdate XmlFileName=".\Uno.WinUI.Lottie.nuspec" XPath="/x:package/x:metadata/x:title" Value="$(PackageNamePrefix).Lottie" Namespace="$(NugetNamespace)" Prefix="x" />
<XmlUpdate XmlFileName=".\Uno.WinUI.RemoteControl.nuspec" XPath="/x:package/x:metadata/x:title" Value="$(PackageNamePrefix).RemoteControl" Namespace="$(NugetNamespace)" Prefix="x" />
<XmlUpdate XmlFileName=".\Uno.WinUI.Skia.Gtk.nuspec" XPath="/x:package/x:metadata/x:title" Value="$(PackageNamePrefix).Skia.Gtk" Namespace="$(NugetNamespace)" Prefix="x" />
<XmlUpdate XmlFileName=".\Uno.WinUI.Skia.Wpf.nuspec" XPath="/x:package/x:metadata/x:title" Value="$(PackageNamePrefix).Skia.Wpf" Namespace="$(NugetNamespace)" Prefix="x" />
<XmlUpdate XmlFileName=".\Uno.WinUI.Skia.Tizen.nuspec" XPath="/x:package/x:metadata/x:title" Value="$(PackageNamePrefix).Skia.Tizen" Namespace="$(NugetNamespace)" Prefix="x" />
<XmlUpdate XmlFileName=".\Uno.WinUI.WebAssembly.nuspec" XPath="/x:package/x:metadata/x:title" Value="$(PackageNamePrefix).WebAssembly" Namespace="$(NugetNamespace)" Prefix="x" />
<!-- Rename dependencies -->
<XmlUpdate XmlFileName="%(_NuspecFiles.Identity)" XPath="/x:package/x:metadata/x:dependencies//x:dependency[@id='Uno.WinUI']/@id" Value="$(PackageNamePrefix)" Namespace="$(NugetNamespace)" Prefix="x" />
<XmlUpdate XmlFileName="%(_NuspecFiles.Identity)" XPath="/x:package/x:metadata/x:dependencies//x:dependency[@id='Uno.WinUI.Runtime.Skia.Gtk']/@id" Value="$(PackageNamePrefix).Runtime.Skia.Gtk" Namespace="$(NugetNamespace)" Prefix="x" />
<XmlUpdate XmlFileName="%(_NuspecFiles.Identity)" XPath="/x:package/x:metadata/x:dependencies//x:dependency[@id='Uno.WinUI.Runtime.Skia.Wpf']/@id" Value="$(PackageNamePrefix).Runtime.Skia.Wpf" Namespace="$(NugetNamespace)" Prefix="x" />
<XmlUpdate XmlFileName="%(_NuspecFiles.Identity)" XPath="/x:package/x:metadata/x:dependencies//x:dependency[@id='Uno.WinUI.Runtime.Skia.Tizen']/@id" Value="$(PackageNamePrefix).Runtime.Skia.Tizen" Namespace="$(NugetNamespace)" Prefix="x" />
<XmlUpdate XmlFileName="%(_NuspecFiles.Identity)" XPath="/x:package/x:metadata/x:dependencies//x:dependency[@id='Uno.WinUI.Runtime.WebAssembly']/@id" Value="$(PackageNamePrefix).Runtime.WebAssembly" Namespace="$(NugetNamespace)" Prefix="x" />
<!-- Adjust build targets file to match WinUI / UWP-->
<Move SourceFiles=".\uno.winui.targets" DestinationFiles=".\$(PackageNamePrefix).targets" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<XmlUpdate XmlFileName=".\Uno.WinUI.nuspec" XPath="/x:package/x:files/x:file[@src='Uno.WinUI.targets']/@src" Value="$(PackageNamePrefix).targets" Namespace="$(NugetNamespace)" Prefix="x" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<!-- Adjust build targets file for UAP -->
<XmlUpdate XmlFileName=".\Uno.WinUI.nuspec" XPath="/x:package/x:files/x:file[@target='buildTransitive\uap10.0.16299\uno.winui.targets']/@target" Value="buildTransitive\uap10.0.16299\$(PackageNamePrefix).targets" Namespace="$(NugetNamespace)" Prefix="x" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<XmlUpdate XmlFileName=".\Uno.WinUI.nuspec" XPath="/x:package/x:files/x:file[@target='buildTransitive\uap10.0.17763\uno.winui.targets']/@target" Value="buildTransitive\uap10.0.17763\$(PackageNamePrefix).targets" Namespace="$(NugetNamespace)" Prefix="x" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<!-- Skia GTK targets/props-->
<Move SourceFiles=".\uno.winui.Skia.Gtk.targets" DestinationFiles=".\$(PackageNamePrefix).Skia.Gtk.targets" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<Move SourceFiles=".\uno.winui.Skia.Gtk.props" DestinationFiles=".\$(PackageNamePrefix).Skia.Gtk.props" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<XmlUpdate XmlFileName=".\uno.winui.Skia.Gtk.nuspec" XPath="/x:package/x:files/x:file[@src='Uno.WinUI.Skia.Gtk.targets']/@src" Value="$(PackageNamePrefix).Skia.Gtk.targets" Namespace="$(NugetNamespace)" Prefix="x" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<XmlUpdate XmlFileName=".\uno.winui.Skia.Gtk.nuspec" XPath="/x:package/x:files/x:file[@src='Uno.WinUI.Skia.Gtk.props']/@src" Value="$(PackageNamePrefix).Skia.Gtk.props" Namespace="$(NugetNamespace)" Prefix="x" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<!-- Skia Tizen targets/props-->
<Move SourceFiles=".\uno.winui.Skia.Tizen.targets" DestinationFiles=".\$(PackageNamePrefix).Skia.Tizen.targets" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<Move SourceFiles=".\uno.winui.Skia.Tizen.props" DestinationFiles=".\$(PackageNamePrefix).Skia.Tizen.props" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<XmlUpdate XmlFileName=".\uno.winui.Skia.Tizen.nuspec" XPath="/x:package/x:files/x:file[@src='Uno.WinUI.Skia.Tizen.targets']/@src" Value="$(PackageNamePrefix).Skia.Tizen.targets" Namespace="$(NugetNamespace)" Prefix="x" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<XmlUpdate XmlFileName=".\uno.winui.Skia.Tizen.nuspec" XPath="/x:package/x:files/x:file[@src='Uno.WinUI.Skia.Tizen.props']/@src" Value="$(PackageNamePrefix).Skia.Tizen.props" Namespace="$(NugetNamespace)" Prefix="x" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<!-- Skia Wpf targets/props-->
<Move SourceFiles=".\uno.winui.Skia.Wpf.targets" DestinationFiles=".\$(PackageNamePrefix).Skia.Wpf.targets" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<Move SourceFiles=".\uno.winui.Skia.Wpf.props" DestinationFiles=".\$(PackageNamePrefix).Skia.Wpf.props" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<XmlUpdate XmlFileName=".\uno.winui.Skia.Wpf.nuspec" XPath="/x:package/x:files/x:file[@src='Uno.WinUI.Skia.Wpf.targets']/@src" Value="$(PackageNamePrefix).Skia.Wpf.targets" Namespace="$(NugetNamespace)" Prefix="x" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<XmlUpdate XmlFileName=".\uno.winui.Skia.Wpf.nuspec" XPath="/x:package/x:files/x:file[@src='Uno.WinUI.Skia.Wpf.props']/@src" Value="$(PackageNamePrefix).Skia.Wpf.props" Namespace="$(NugetNamespace)" Prefix="x" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<!-- Wasm targets/props-->
<Move SourceFiles=".\uno.winui.WebAssembly.targets" DestinationFiles=".\$(PackageNamePrefix).WebAssembly.targets" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<Move SourceFiles=".\uno.winui.WebAssembly.props" DestinationFiles=".\$(PackageNamePrefix).WebAssembly.props" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<XmlUpdate XmlFileName=".\uno.winui.WebAssembly.nuspec" XPath="/x:package/x:files/x:file[@src='Uno.WinUI.WebAssembly.targets']/@src" Value="$(PackageNamePrefix).WebAssembly.targets" Namespace="$(NugetNamespace)" Prefix="x" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<XmlUpdate XmlFileName=".\uno.winui.WebAssembly.nuspec" XPath="/x:package/x:files/x:file[@src='Uno.WinUI.WebAssembly.props']/@src" Value="$(PackageNamePrefix).WebAssembly.props" Namespace="$(NugetNamespace)" Prefix="x" Condition="'$(UNO_UWP_BUILD)'=='true'"/>
<!-- Lottie move file -->
<Move SourceFiles="..\src\AddIns\Uno.UI.Lottie\buildTransitive\Uno.UI.Lottie.targets" DestinationFiles="..\src\AddIns\Uno.UI.Lottie\buildTransitive\$(PackageNamePrefix).Lottie.targets" />
<!-- MSAL move file -->
<Move SourceFiles="..\src\AddIns\Uno.UI.MSAL\buildTransitive\Uno.UI.MSAL.targets" DestinationFiles="..\src\AddIns\Uno.UI.MSAL\buildTransitive\$(PackageNamePrefix).MSAL.targets" />
<!-- Runtime package move files -->
<Move SourceFiles="..\src\Uno.UI.Runtime.Skia.Gtk\buildTransitive\Uno.UI.Runtime.Skia.Gtk.props" DestinationFiles="..\src\Uno.UI.Runtime.Skia.Gtk\buildTransitive\$(PackageNamePrefix).Runtime.Skia.Gtk.props" />
<Move SourceFiles="..\src\Uno.UI.Runtime.Skia.Gtk\buildTransitive\Uno.UI.Runtime.Skia.Gtk.targets" DestinationFiles="..\src\Uno.UI.Runtime.Skia.Gtk\buildTransitive\$(PackageNamePrefix).Runtime.Skia.Gtk.targets" />
<Move SourceFiles="..\src\Uno.UI.Runtime.Skia.Tizen\buildTransitive\Uno.UI.Runtime.Skia.Tizen.props" DestinationFiles="..\src\Uno.UI.Runtime.Skia.Tizen\buildTransitive\$(PackageNamePrefix).Runtime.Skia.Tizen.props" />
<Move SourceFiles="..\src\Uno.UI.Runtime.Skia.Tizen\buildTransitive\Uno.UI.Runtime.Skia.Tizen.targets" DestinationFiles="..\src\Uno.UI.Runtime.Skia.Tizen\buildTransitive\$(PackageNamePrefix).Runtime.Skia.Tizen.targets" />
<Move SourceFiles="..\src\Uno.UI.Runtime.Skia.Wpf\buildTransitive\Uno.UI.Runtime.Skia.Wpf.props" DestinationFiles="..\src\Uno.UI.Runtime.Skia.Wpf\buildTransitive\$(PackageNamePrefix).Runtime.Skia.Wpf.props" />
<Move SourceFiles="..\src\Uno.UI.Runtime.Skia.Wpf\buildTransitive\Uno.UI.Runtime.Skia.Wpf.targets" DestinationFiles="..\src\Uno.UI.Runtime.Skia.Wpf\buildTransitive\$(PackageNamePrefix).Runtime.Skia.Wpf.targets" />
<Move SourceFiles="..\src\Uno.UI.Runtime.WebAssembly\buildTransitive\Uno.UI.Runtime.WebAssembly.props" DestinationFiles="..\src\Uno.UI.Runtime.WebAssembly\buildTransitive\$(PackageNamePrefix).Runtime.WebAssembly.props" />
<Move SourceFiles="..\src\Uno.UI.Runtime.WebAssembly\buildTransitive\Uno.UI.Runtime.WebAssembly.targets" DestinationFiles="..\src\Uno.UI.Runtime.WebAssembly\buildTransitive\$(PackageNamePrefix).Runtime.WebAssembly.targets" />
</Target>
<Target Name="BuildNuGetPackage">
<!-- Create the packages -->
<Exec Command="$(NuGetBin) pack Uno.WinUI.nuspec -Verbosity Detailed -Version "$(GITVERSION_FullSemVer)" -Properties NoWarn=NU5100,NU5105,NU5131" />
<Exec Command="$(NuGetBin) pack Uno.WinUI.Lottie.nuspec -Verbosity Detailed -Version "$(GITVERSION_FullSemVer)" -Properties NoWarn=NU5100,NU5105,NU5131" />
<Exec Command="$(NuGetBin) pack Uno.WinUI.RemoteControl.nuspec -Verbosity Detailed -Version "$(GITVERSION_FullSemVer)" -Properties NoWarn=NU5100,NU5105,NU5131" />
<Exec Command="$(NuGetBin) pack Uno.WinUI.Skia.Gtk.nuspec -Verbosity Detailed -Version "$(GITVERSION_FullSemVer)" -Properties NoWarn=NU5100,NU5105,NU5131" />
<Exec Command="$(NuGetBin) pack Uno.WinUI.Skia.Tizen.nuspec -Verbosity Detailed -Version "$(GITVERSION_FullSemVer)" -Properties NoWarn=NU5100,NU5105,NU5131" />
<Exec Command="$(NuGetBin) pack Uno.WinUI.Skia.Wpf.nuspec -Verbosity Detailed -Version "$(GITVERSION_FullSemVer)" -Properties NoWarn=NU5100,NU5105,NU5131" />
<Exec Command="$(NuGetBin) pack Uno.WinUI.WebAssembly.nuspec -Verbosity Detailed -Version "$(GITVERSION_FullSemVer)" -Properties NoWarn=NU5100,NU5105,NU5131" />
</Target>
<Target Name="ValidatePackage" AfterTargets="UnoBuild" Condition="'$(BuildingInsideVisualStudio)'=='' and '$(UNO_UWP_BUILD)'=='true'">
<PropertyGroup>
<PackageNamePrefix>Uno.WinUI</PackageNamePrefix>
<PackageNamePrefix Condition="'$(UNO_UWP_BUILD)'=='true'">Uno.UI</PackageNamePrefix>
</PropertyGroup>
<Exec Command="dotnet tool install --tool-path $(MSBuildThisFileDirectory)\tools Uno.PackageDiff --version 1.0.0-dev.36" IgnoreExitCode="true" />
<Exec Command="$(MSBuildThisFileDirectory)\tools\generatepkgdiff.exe --base=$(PackageNamePrefix) --other=$(PackageNamePrefix).$(GITVERSION_FullSemVer).nupkg --diffignore=PackageDiffIgnore.xml --outfile=$(OutputDir)\ApiDiff.$(GITVERSION_FullSemVer).md" />
</Target>
<Target Name="ValidatePackageReferenceAPI" AfterTargets="UnoBuild">
<PropertyGroup>
<PackageNamePrefix>Uno.WinUI</PackageNamePrefix>
<PackageNamePrefix Condition="'$(UNO_UWP_BUILD)'=='true'">Uno.UI</PackageNamePrefix>
</PropertyGroup>
<Exec Command="dotnet $(MSBuildThisFileDirectory)..\src\Uno.ReferenceImplComparer\bin\Release\Uno.ReferenceImplComparer.dll $(MSBuildThisFileDirectory)$(PackageNamePrefix).$(GITVERSION_FullSemVer).nupkg" />
</Target>
</Project>