forked from unoplatform/uno
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.targets
174 lines (157 loc) · 9.52 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
<Project ToolsVersion="15.0">
<Import Project="TargetFrameworkSelection.targets" />
<Import Project="uno.mobile-cross-targeting-disable.props" />
<Import Project="Uno.CrossTargetting.targets" />
<PropertyGroup>
<Product>$(AssemblyName) $(TargetFramework)</Product>
<Product Condition="'$(UnoRuntimeIdentifier)' != ''">$(AssemblyName) ($(TargetFramework) $(UnoRuntimeIdentifier))</Product>
<CommunityToolkitMvvmVersion>8.2.1</CommunityToolkitMvvmVersion>
</PropertyGroup>
<ItemGroup Condition="$(EnableAutomaticXamlPageInclusion)">
<Page Include="**/*.xaml" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(PageExclusions)" />
<None Remove="**/*.xaml" />
</ItemGroup>
<ItemGroup Condition="'$(XamlMergeOutputFile)'!=''">
<XamlMergeInput Include="@(Page)" Exclude="@(_NonMergedXamlResources)" />
</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"
BeforeTargets="Build"
Condition="'$(AndroidUseIntermediateDesignerFile)'=='True' and $(IsAndroid) and '$(TargetFramework)'!='net8.0-android' and '$(TargetFramework)'!='net7.0-android'">
<MakeDir Directories="obj\$(TargetFramework)\Resources" />
<WriteLinesToFile File="$(AndroidResgenFile)" Lines="// Empty Content from uno.ui Directory.Build.targets." />
</Target>
<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>
<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="8.0.0-dev.210" />
<PackageReference Update="Uno.Wasm.Bootstrap.DevServer" Version="8.0.0-dev.210" />
<PackageReference Update="xamarin.build.download" Version="0.11.4" PrivateAssets="all" />
<PackageReference Update="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Update="MSTest.TestFramework" Version="2.2.8" />
<PackageReference Update="Uno.MonoAnalyzers" Version="1.0.0" PrivateAssets="all" />
<PackageReference Update="System.Memory" Version="4.5.5" />
<PackageReference Update="Uno.Wasm.WebSockets" Version="1.1.0" />
<PackageReference Update="Microsoft.TypeScript.MSBuild" Version="4.3.5" />
<PackageReference Update="NUnit" Version="3.13.3" />
<PackageReference Update="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Update="Uno.UITest" Version="1.1.0-dev.59" />
<PackageReference Update="Uno.UITest.Selenium" Version="1.1.0-dev.59" />
<PackageReference Update="Uno.UITest.Xamarin" Version="1.1.0-dev.59" />
<PackageReference Update="Uno.UITest.Helpers" Version="1.1.0-dev.59" />
<PackageReference Update="Uno.Fonts.Fluent" Version="2.2.2" />
<PackageReference Update="System.ValueTuple" Version="4.5.0" />
<PackageReference Update="Xamarin.DuoSdk" Version="0.0.3.4" />
<PackageReference Update="Xamarin.UITest" Version="4.1.4" />
<PackageReference Update="Xamarin.TestCloud.Agent" Version="0.23.2" />
<PackageReference Update="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Update="SkiaSharp.Views" Version="2.88.3" />
<PackageReference Update="SkiaSharp.Views.Uno" Version="2.88.3" />
<PackageReference Update="SkiaSharp.Views.Uno.WinUI" Version="2.88.3" />
<PackageReference Update="SkiaSharp.Views.WPF" Version="2.88.3" />
<PackageReference Update="SkiaSharp" Version="2.88.3" />
<PackageReference Update="SkiaSharp.NativeAssets.Linux" Version="2.88.3" />
<PackageReference Update="SkiaSharp.Harfbuzz" Version="2.88.3" />
<PackageReference Update="SkiaSharp.Skottie" Version="2.88.3" />
<PackageReference Update="SkiaSharp.NativeAssets.Android" Version="2.88.3" />
<PackageReference Update="SkiaSharp.NativeAssets.iOS" Version="2.88.3" />
<PackageReference Update="SkiaSharp.NativeAssets.MacCatalyst" Version="2.88.3" />
<PackageReference Update="SkiaSharp.NativeAssets.macos" Version="2.88.3" />
<PackageReference Update="Svg.Skia" Version="1.0.0" />
<PackageReference Update="HarfBuzzSharp.NativeAssets.Linux" Version="2.8.2.3" />
<PackageReference Update="SkiaSharp.HarfBuzz" Version="2.88.3" />
<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="Microsoft.Extensions.Logging.Filter" Version="1.1.2" />
<PackageReference Update="Uno.Extensions.Logging.WebAssembly.Console" Version="1.4.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)" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0-android'">
<PackageReference Update="Xamarin.AndroidX.Legacy.Support.v4" Version="1.0.0.10" />
<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" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0-android'">
<PackageReference Update="Xamarin.AndroidX.Legacy.Support.v4" Version="1.0.0.10" />
<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" />
</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>
</Project>