-
Notifications
You must be signed in to change notification settings - Fork 738
/
Directory.Build.targets
207 lines (184 loc) · 11.5 KB
/
Directory.Build.targets
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
<Project>
<Import Project="Uno.CrossTargetting.targets" />
<PropertyGroup>
<Product>$(AssemblyName) $(TargetFramework)</Product>
<Product Condition="'$(UnoRuntimeIdentifier)' != ''">$(AssemblyName) ($(TargetFramework) $(UnoRuntimeIdentifier))</Product>
<CommunityToolkitMvvmVersion>8.2.2</CommunityToolkitMvvmVersion>
</PropertyGroup>
<PropertyGroup>
<!--
Ensures that AssignLinkMetadata runs before AssignTargetPaths.
Otherwise, AssignTargetPath will generate a rooted path and will break embedded sources
LogicalName metadata's behavior.
-->
<!-- NOTE: This code already exists in Uno.UI.Tasks.targets, but inside of uno this targets file is imported very early -->
<!-- and then AssignTargetPathsDependsOn gets cleared by msbuild -->
<!-- This shouldn't be happening outside of Uno where Uno.UI.Tasks.targets is imported from NuGet package at the correct time -->
<AssignTargetPathsDependsOn>$(AssignTargetPathsDependsOn);AssignLinkMetadata</AssignTargetPathsDependsOn>
</PropertyGroup>
<ItemGroup Condition="$(EnableAutomaticXamlPageInclusion)">
<Page Include="**/*.xaml" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(PageExclusions)" />
<None Remove="**/*.xaml" />
</ItemGroup>
<ItemGroup Condition="'$(XamlMergeOutputFile)'!=''">
<XamlMergeInput Include="@(Page)" Exclude="@(_NonMergedXamlResources)" />
</ItemGroup>
<ItemGroup>
<UpToDateCheckInput Include="@(Page)" />
</ItemGroup>
<!--
Comment out this section if you need to update Resource.designer.cs files.
See DEVELOPMENT.md#Android for details.
-->
<Choose>
<When Condition="'$(TargetPlatformIdentifier)' == 'Android' and '$(AndroidApplication)' != 'true'">
<PropertyGroup >
<AndroidGenerateResourceDesigner>false</AndroidGenerateResourceDesigner>
<AndroidUseIntermediateDesignerFile>false</AndroidUseIntermediateDesignerFile>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<!--
This works around the fact that AndroidResgenFile is
automatically included as compiled file, even if AndroidUseIntermediateDesignerFile
is set to true.
-->
<AndroidUseIntermediateDesignerFile>True</AndroidUseIntermediateDesignerFile>
<AndroidResgenFile>obj\$(TargetFramework)\Resources\Resource.Designer.cs</AndroidResgenFile>
</PropertyGroup>
</Otherwise>
</Choose>
<Target Name="AndroidResourceGenWorkaround_16_2" AfterTargets="_UpdateAndroidResgen" Condition="'$(AndroidUseIntermediateDesignerFile)'=='True' and !Exists($(_AndroidResourceDesignerFile))">
<WriteLinesToFile File="$(_AndroidResourceDesignerFile)" Lines="// Empty Content from uno.ui Directory.Build.targets." />
</Target>
<PropertyGroup>
<SkiaSharpVersion>2.88.7</SkiaSharpVersion>
<!-- TODO: Uncomment when we're net8.0+ to have SamplesApp serve as a good test for SkiaSharp 3 support -->
<!-- <SkiaSharpVersion Condition="'$(IsTestProject)' == 'true' or '$(IsSampleProject)' == 'true'">3.0.0-preview.3.1</SkiaSharpVersion> -->
</PropertyGroup>
<ItemGroup>
<PackageReference Update="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.1.9" />
<!-- Keep aligned with MSBuild extras' default ExtrasUwpMetaPackageVersion -->
<PackageReference Update="Uno.Core.Extensions" Version="4.0.1" />
<PackageReference Update="Uno.Core.Extensions.Logging" Version="4.0.1" />
<PackageReference Update="Uno.Core.Extensions.Logging.Singleton" Version="4.0.1" />
<PackageReference Update="Uno.Core.Extensions.Disposables" Version="4.0.1" />
<PackageReference Update="Uno.Core.Extensions.Compatibility" Version="4.0.1" />
<PackageReference Update="Uno.Diagnostics.Eventing" Version="2.0.1" />
<PackageReference Update="Uno.Wasm.Bootstrap" Version="9.0.8" />
<PackageReference Update="MSTest" Version="3.6.3" />
<PackageReference Update="MSTest.TestFramework" Version="3.6.3" />
<PackageReference Update="MSTest.TestAdapter" Version="3.6.3" />
<PackageReference Update="MSTest.Analyzers" Version="3.3.1" />
<PackageReference Update="Uno.MonoAnalyzers" Version="1.0.0" PrivateAssets="all" />
<PackageReference Update="Uno.Wasm.WebSockets" Version="1.1.0" />
<PackageReference Update="Microsoft.TypeScript.MSBuild" Version="4.3.5" />
<PackageReference Update="NUnit" Version="3.14.0" />
<PackageReference Update="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Update="Uno.UITest" Version="1.1.0-dev.70" />
<PackageReference Update="Uno.UITest.Selenium" Version="1.1.0-dev.70" />
<PackageReference Update="Uno.UITest.Xamarin" Version="1.1.0-dev.70" />
<PackageReference Update="Uno.UITest.Helpers" Version="1.1.0-dev.70" />
<PackageReference Update="Uno.Fonts.Fluent" version="2.4.5" />
<PackageReference Update="Uno.Resizetizer" Version="1.2.0-dev.72" />
<PackageReference Update="Xamarin.DuoSdk" Version="0.0.3.4" />
<PackageReference Update="Xamarin.UITest" Version="4.3.5" />
<PackageReference Update="Xamarin.TestCloud.Agent" Version="0.23.2" />
<PackageReference Update="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Update="System.Private.Uri" Version="4.3.2" />
<PackageReference Update="System.Net.Http" Version="4.3.4" />
<PackageReference Update="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Update="NuGet.Packaging" Version="6.3.4" />
<PackageReference Update="System.Formats.Asn1" Version="8.0.1" />
<PackageReference Update="System.Text.Json" Version="8.0.5" />
<PackageReference Update="SkiaSharp.Views" Version="$(SkiaSharpVersion)" />
<PackageReference Update="SkiaSharp.Views.Uno" Version="$(SkiaSharpVersion)" />
<PackageReference Update="SkiaSharp.Views.Uno.WinUI" Version="$(SkiaSharpVersion)" />
<PackageReference Update="SkiaSharp.Views.WPF" Version="$(SkiaSharpVersion)" />
<PackageReference Update="SkiaSharp" Version="$(SkiaSharpVersion)" />
<PackageReference Update="SkiaSharp.NativeAssets.Linux" Version="$(SkiaSharpVersion)" />
<PackageReference Update="SkiaSharp.Harfbuzz" Version="$(SkiaSharpVersion)" />
<PackageReference Update="SkiaSharp.Skottie" Version="$(SkiaSharpVersion)" />
<PackageReference Update="SkiaSharp.NativeAssets.Android" Version="$(SkiaSharpVersion)" />
<PackageReference Update="SkiaSharp.NativeAssets.iOS" Version="$(SkiaSharpVersion)" />
<PackageReference Update="SkiaSharp.NativeAssets.MacCatalyst" Version="$(SkiaSharpVersion)" />
<PackageReference Update="SkiaSharp.NativeAssets.macos" Version="$(SkiaSharpVersion)" />
<PackageReference Update="HarfBuzzSharp.NativeAssets.macOS" Version="7.3.0.1" />
<PackageReference Update="HarfBuzzSharp.NativeAssets.Linux" Version="7.3.0.1" />
<PackageReference Update="harfbuzzsharp.nativeassets.ios" Version="7.3.0.1" />
<PackageReference Update="SkiaSharp.HarfBuzz" Version="$(SkiaSharpVersion)" />
<PackageReference Condition=" '$(TargetFramework)' == '$(NetPrevious)' " Update="Microsoft.Win32.SystemEvents" Version="8.0.0" />
<PackageReference Condition=" '$(TargetFramework)' == '$(NetCurrent)' " Update="Microsoft.Win32.SystemEvents" Version="9.0.0" />
<PackageReference Update="Svg.Skia" Version="1.0.0.1" />
<PackageReference Update="GtkSharp" Version="3.24.24.38" />
<PackageReference Update="System.Json" Version="4.7.1" />
<PackageReference Update="FluentAssertions" Version="5.10.3" />
<PackageReference Update="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageReference Update="Microsoft.Extensions.Logging.Debug" Version="5.0.0" />
<PackageReference Update="Uno.Extensions.Logging.WebAssembly.Console" Version="1.7.0" />
<PackageReference Update="Uno.Extensions.Logging.WebAssembly.OSLog" Version="1.4.0" />
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies.net48" Version="1.0.3" />
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies.net472" Version="1.0.3" />
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies.net461" Version="1.0.3" />
<PackageReference Update="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Update="CommunityToolkit.Mvvm" Version="$(CommunityToolkitMvvmVersion)" />
<PackageReference Update="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Update="Microsoft.Web.WebView2" Version="1.0.2592.51" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0-android'">
<PackageReference Update="Xamarin.AndroidX.AppCompat" Version="1.3.1.3" />
<PackageReference Update="Xamarin.AndroidX.RecyclerView" Version="1.2.1.3" />
<PackageReference Update="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.3.1.3" />
<PackageReference Update="Xamarin.AndroidX.Fragment" Version="1.3.6.3" />
<PackageReference Update="Xamarin.AndroidX.SwipeRefreshLayout" Version="1.1.0.10" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0-android'">
<PackageReference Update="Xamarin.AndroidX.AppCompat" Version="1.3.1.3" />
<PackageReference Update="Xamarin.AndroidX.RecyclerView" Version="1.2.1.3" />
<PackageReference Update="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.3.1.3" />
<PackageReference Update="Xamarin.AndroidX.Fragment" Version="1.3.6.3" />
<PackageReference Update="Xamarin.AndroidX.SwipeRefreshLayout" Version="1.1.0.10" />
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'macos'">
<!-- Workaround: For iOS/macOS builds, System.Private.Uri is pulled implicitly with a vulnerable version -->
<!-- There is a bit of related discussions in https://github.com/dotnet/sdk/issues/30659 -->
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
</ItemGroup>
<Target Name="ValidateSolutionPath" BeforeTargets="Build">
<Error Condition="$(MSBuildThisFileDirectory.Contains(' '))"
Text="The Uno.UI Solution cannot build with a space in the path. Consider changing to a path without spaces."/>
</Target>
<Target Name="WorkaroundMissingWinAppSDKDLL"
BeforeTargets="BinPlaceBootstrapDll">
<!-- Workaround for
C:\a\.nuget\microsoft.windowsappsdk.foundation\1.0.0-experimental1\build\Microsoft.WindowsAppSDK.Bootstrap.targets(11,5):
error MSB3030: Could not copy the file "C:\a\.nuget\microsoft.windowsappsdk.foundation\1.0.0-experimental1\build\..\runtimes\lib\native\AnyCPU\Microsoft.WindowsAppSDK.Bootstrap.dll" because it was not found.
-->
<CreateProperty Value="x86">
<Output
TaskParameter="Value"
PropertyName="_WindowsAppSDKFoundationPlatform" />
</CreateProperty>
</Target>
<Target Name="WorkaroundMissingWinAppSDKDLL_2"
BeforeTargets="BeforeBuild">
<!-- Workaround for
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4559,5):
error MSB3030: Could not copy the file "C:\a\.nuget\microsoft.windowsappsdk\1.0.0-preview3\build\..\runtimes\lib\native\AnyCPU\Microsoft.WindowsAppRuntime.Bootstrap.dll" because it was not found.
-->
<ItemGroup>
<_itemToRemove Include="@(ReferenceCopyLocalPaths)" Condition="'%(FileName)%(Extension)'=='Microsoft.WindowsAppRuntime.Bootstrap.dll'" />
<ReferenceCopyLocalPaths Remove="@(_itemToRemove)"/>
</ItemGroup>
</Target>
<!-- Workaround for https://github.com/xamarin/xamarin-macios/issues/17005 -->
<Target Name="_DisableRemoteBuildForLibraries" BeforeTargets="_SayHello" Condition="'$(OutputType)'=='Library'">
<PropertyGroup>
<IsRemoteBuild>false</IsRemoteBuild>
<ServerAddress></ServerAddress>
</PropertyGroup>
</Target>
<Import Project="Workaround-43339.targets" />
</Project>