-
Notifications
You must be signed in to change notification settings - Fork 533
/
Xamarin.Android.Build.Tasks.targets
412 lines (394 loc) · 20.3 KB
/
Xamarin.Android.Build.Tasks.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
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
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
<?xml version="1.0" encoding="UTF-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask AssemblyFile="$(BootstrapTasksAssembly)" TaskName="Xamarin.Android.Tools.BootstrapTasks.GenerateProfile" />
<UsingTask AssemblyFile="$(BootstrapTasksAssembly)" TaskName="Xamarin.Android.Tools.BootstrapTasks.GenerateSupportedPlatforms" />
<UsingTask AssemblyFile="$(BootstrapTasksAssembly)" TaskName="Xamarin.Android.Tools.BootstrapTasks.UnzipDirectoryChildren" />
<UsingTask AssemblyFile="$(PrepTasksAssembly)" TaskName="Xamarin.Android.BuildTools.PrepTasks.ReplaceFileContents" />
<UsingTask AssemblyFile="$(PrepTasksAssembly)" TaskName="Xamarin.Android.BuildTools.PrepTasks.Which" />
<PropertyGroup>
<_SharedRuntimeBuildPath Condition=" '$(_SharedRuntimeBuildPath)' == '' ">$(XAInstallPrefix)xbuild-frameworks\MonoAndroid\</_SharedRuntimeBuildPath>
<_GeneratedProfileClass>$(MSBuildThisFileDirectory)$(IntermediateOutputPath)Profile.g.cs</_GeneratedProfileClass>
<ResolveReferencesDependsOn>
$(ResolveReferencesDependsOn);
_GenerateSupportedPlatforms;
</ResolveReferencesDependsOn>
<BuildDependsOn>
_GenerateXACommonProps;
$(BuildDependsOn);
_CopyExtractedMultiDexJar;
_BuildMonoScripts;
_CopyExtraPackageContent;
_GenerateBundledVersions;
_CopyNetSdkTargets;
_CopyVSExtensionTargets;
_WriteVersionFiles;
</BuildDependsOn>
<_AndroidSdkLocation Condition="'$(_AndroidSdkLocation)'==''">$(AndroidSdkDirectory)</_AndroidSdkLocation>
<_MultiDexAarInAndroidSdk>extras\android\m2repository\com\android\support\multidex\1.0.1\multidex-1.0.1.aar</_MultiDexAarInAndroidSdk>
<_SupportLicense Condition="Exists('$(_AndroidSdkLocation)\extras\android\m2repository\NOTICE.txt')">$(_AndroidSdkLocation)\extras\android\m2repository\NOTICE.txt</_SupportLicense>
<_SupportLicense Condition="Exists('$(_AndroidSdkLocation)\extras\android\m2repository\m2repository\NOTICE.txt')">$(_AndroidSdkLocation)\extras\android\m2repository\m2repository\NOTICE.txt</_SupportLicense>
</PropertyGroup>
<ItemGroup>
<None
Include="MSBuild\Xamarin\Android\Xamarin.Android.Bindings.Before.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Xamarin.Android.Bindings.Before.targets</Link>
</None>
<None
Include="MSBuild\Xamarin\Android\Xamarin.Android.Bindings.ClassParse.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Xamarin.Android.Bindings.ClassParse.targets</Link>
</None>
<None
Include="MSBuild\Xamarin\Android\Xamarin.Android.Bindings.Core.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Xamarin.Android.Bindings.Core.targets</Link>
</None>
<None
Include="MSBuild\Xamarin\Android\Xamarin.Android.Bindings.Documentation.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Xamarin.Android.Bindings.Documentation.targets</Link>
</None>
<None
Include="MSBuild\Xamarin\Android\Xamarin.Android.Bindings.JarToXml.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Xamarin.Android.Bindings.JarToXml.targets</Link>
</None>
<None
Include="MSBuild\Xamarin\Android\Xamarin.Android.Bindings.Maven.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Xamarin.Android.Bindings.Maven.targets</Link>
</None>
<None
Include="MSBuild\Xamarin\Android\Xamarin.Android.Common\ImportAfter\Microsoft.Cpp.Android.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Xamarin.Android.Common\ImportAfter\Microsoft.Cpp.Android.targets</Link>
</None>
<None
Include="MSBuild\Xamarin\Android\Xamarin.Android.AvailableItems.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Xamarin.Android.AvailableItems.targets</Link>
</None>
<None
Include="MSBuild\Xamarin\Android\Xamarin.Android.Common.After.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Xamarin.Android.Common.After.targets</Link>
</None>
<None
Include="MSBuild\Xamarin\Android\Xamarin.Android.Common.Before.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Xamarin.Android.Common.Before.targets</Link>
</None>
<None
Include="MSBuild\Xamarin\Android\Xamarin.Android.DefaultOutputPaths.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Xamarin.Android.DefaultOutputPaths.targets</Link>
</None>
<None Include="MSBuild\Xamarin\Android\Xamarin.Android.Designer.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Xamarin.Android.Designer.targets</Link>
</None>
<None Include="MSBuild\Xamarin\Android\Xamarin.Android.Resource.Designer.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Xamarin.Android.Resource.Designer.targets</Link>
</None>
<None Include="MSBuild\Xamarin\Android\Xamarin.Android.Aapt2.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Xamarin.Android.Aapt2.targets</Link>
</None>
<None Include="MSBuild\Xamarin\Android\Xamarin.Android.Javac.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>Xamarin.Android.Javac.targets</Link>
</None>
<None Include="Xamarin.Android.Analysis.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Xamarin.Android.Application.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Xamarin.Android.Bindings.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Xamarin.Android.Common.props">
<SubType>Designer</SubType>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Xamarin.Android.BuildInfo.txt">
<SubType>Designer</SubType>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Xamarin.Android.Common.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<SubType>Designer</SubType>
</None>
<None Include="Xamarin.Android.CSharp.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Xamarin.Android.D8.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Xamarin.Android.DesignTime.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Xamarin.Android.EmbeddedResource.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Xamarin.Android.FSharp.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Xamarin.Android.PCLSupport.props">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Xamarin.Android.PCLSupport.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Xamarin.Android.Tooling.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Xamarin.Android.VisualBasic.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="ManifestOverlays\Timing.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<_SharedRuntimeAssemblies Include="@(MonoProfileAssembly->'$(_SharedRuntimeBuildPath)v1.0\%(Identity)')" />
<_SharedRuntimeAssemblies Include="$(_SharedRuntimeBuildPath)v1.0\Mono.Data.Sqlite.dll" />
<_SharedRuntimeAssemblies Include="$(_SharedRuntimeBuildPath)v1.0\Mono.Posix.dll" />
<_SharedRuntimeAssemblies Include="$(_SharedRuntimeBuildPath)v1.0\Java.Interop.dll" />
<_SharedRuntimeAssemblies Include="$(_SharedRuntimeBuildPath)v1.0\System.EnterpriseServices.dll" />
<_SharedRuntimeAssemblies Include="$(_SharedRuntimeBuildPath)$(AndroidFrameworkVersion)\Mono.Android.Export.dll" />
<!-- These files are build after Xamarin.Android.Build.Tasks but MUST be included in Profile.g.cs -->
<_SharedRuntimeAssemblies Include="$(_SharedRuntimeBuildPath)$(AndroidFrameworkVersion)\Mono.Android.dll" />
</ItemGroup>
<Target Name="_GenerateMonoAndroidEnums"
BeforeTargets="CoreCompile"
Inputs="..\Mono.Android\obj\$(Configuration)\android-$(AndroidLatestStableApiLevel)\mcw\api.xml"
Outputs="@(_MonoAndroidEnum)">
<MSBuild
Condition=" !Exists ('%(_MonoAndroidEnum.Identity)') "
Projects="..\Mono.Android\Mono.Android.csproj"
Properties="Configuration=$(Configuration);AndroidApiLevel=$(AndroidLatestStableApiLevel);AndroidFrameworkVersion=$(AndroidLatestStableFrameworkVersion);AndroidPlatformId=$(AndroidLatestStablePlatformId)"
/>
</Target>
<Target Name="_GenerateXACommonProps"
DependsOnTargets="GetXAVersionInfo"
BeforeTargets="DeployOutputFiles"
Inputs="Xamarin.Android.Common.props.in;Xamarin.Android.BuildInfo.txt.in;..\..\build-tools\scripts\Ndk.targets"
Outputs="Xamarin.Android.Common.props;Xamarin.Android.BuildInfo.txt">
<ReplaceFileContents
SourceFile="Xamarin.Android.BuildInfo.txt.in"
DestinationFile="Xamarin.Android.BuildInfo.txt"
Replacements="@JAVA_INTEROP_COMMIT@=$(_BuildInfo_JavaInteropCommit);@SQLITE_COMMIT@=$(_BuildInfo_SqliteCommit);@XAMARIN_ANDROID_TOOLS_COMMIT@=$(_BuildInfo_XamarinAndroidToolsCommit);">
</ReplaceFileContents>
<ReplaceFileContents
SourceFile="Xamarin.Android.Common.props.in"
DestinationFile="Xamarin.Android.Common.props"
Replacements="@PACKAGE_VERSION@=$(ProductVersion);@PACKAGE_VERSION_BUILD@=$(XAVersionCommitCount);@NDK_ARMEABI_V7_API@=$(AndroidNdkApiLevel_ArmV7a);@NDK_ARM64_V8A_API@=$(AndroidNdkApiLevel_ArmV8a);@NDK_X86_API@=$(AndroidNdkApiLevel_X86);@NDK_X86_64_API@=$(AndroidNdkApiLevel_X86_64);@BUNDLETOOL_VERSION@=$(XABundleToolVersion)">
</ReplaceFileContents>
</Target>
<Target Name="_GenerateSupportedPlatforms"
Inputs="$(BootstrapTasksAssembly);$(MSBuildThisFile);..\..\bin\Build$(Configuration)\Mono.Android.Apis.projitems"
Outputs="Microsoft.Android.Sdk\targets\Microsoft.Android.Sdk.SupportedPlatforms.targets">
<GenerateSupportedPlatforms
AndroidApiInfo="@(AndroidApiInfo)"
TargetApiLevel="$(AndroidDefaultTargetDotnetApiLevel)"
MinimumApiLevel="$(AndroidMinimumDotNetApiLevel)"
OutputFile="Microsoft.Android.Sdk\targets\Microsoft.Android.Sdk.SupportedPlatforms.targets"
/>
</Target>
<Target Name="_GenerateProfileClass"
BeforeTargets="CoreCompile"
Inputs="@(_SharedRuntimeAssemblies)"
Outputs="$(_GeneratedProfileClass)">
<GenerateProfile Files="@(_SharedRuntimeAssemblies)" OutputFile="$(_GeneratedProfileClass)" />
<WriteLinesToFile
File="$(IntermediateOutputPath)$(CleanFile)"
Lines="$(_GeneratedProfileClass)"
Overwrite="false"/>
<ItemGroup>
<FileWrites Include="$(_GeneratedProfileClass)" />
</ItemGroup>
</Target>
<Target Name="_CopyExtractedMultiDexJar"
Inputs="$(_AndroidSdkLocation)\$(_MultiDexAarInAndroidSdk);$(_SupportLicense)"
Outputs="$(OutputPath)android-support-multidex.jar;$(OutputPath)MULTIDEX_JAR_LICENSE">
<UnzipDirectoryChildren
NoSubdirectory="true"
SourceFiles="$(_AndroidSdkLocation)\$(_MultiDexAarInAndroidSdk)"
DestinationFolder="$(IntermediateOutputPath)multidex-aar" />
<Copy
SourceFiles="$(IntermediateOutputPath)multidex-aar\classes.jar"
DestinationFiles="$(OutputPath)android-support-multidex.jar" />
<Touch Files="$(OutputPath)android-support-multidex.jar" />
<Copy
SourceFiles="$(_SupportLicense)"
DestinationFiles="$(OutputPath)MULTIDEX_JAR_LICENSE" />
<Copy
SourceFiles="$(_SupportLicense)"
DestinationFiles="$(OutputPath)MULTIDEX_JAR_LICENSE.txt"
/>
<Touch Files="$(OutputPath)MULTIDEX_JAR_LICENSE;$(OutputPath)MULTIDEX_JAR_LICENSE.txt" />
</Target>
<PropertyGroup>
<_MonoScriptDestinationDirectory>$(OutputPath)$(HostOS)</_MonoScriptDestinationDirectory>
<_MonoScriptSourceDirectory>..\..\tools\scripts</_MonoScriptSourceDirectory>
</PropertyGroup>
<ItemGroup>
<_MonoScript Include="mono-symbolicate" />
<_MonoScript Include="illinkanalyzer" />
<_MonoScript Include="jit-times" />
<_MonoScript Include="aprofutil" />
<_MonoScriptSource Include="@(_MonoScript->'$(_MonoScriptSourceDirectory)\%(Identity)')" />
<_MonoScriptSource Include="mono.config" />
<_MonoScriptDestination Include="@(_MonoScript->'$(_MonoScriptDestinationDirectory)\%(Identity)')" />
<_MonoScriptDestination Include="$(_MonoScriptDestinationDirectory)\mono.config" />
</ItemGroup>
<Target Name="_BuildMonoScripts"
Inputs="@(_MonoScriptSource)"
Outputs="@(_MonoScriptDestination)"
Condition=" '$(HostOS)' != 'Windows' ">
<MakeDir Directories="$(_MonoScriptDestinationDirectory)" />
<Copy
SourceFiles="@(_MonoScriptSource)"
DestinationFiles="@(_MonoScriptDestination)"
/>
<Exec Command="chmod +x @(_MonoScriptDestination->'%(Identity)', ' ')" />
</Target>
<ItemGroup>
<InputAssemblies Include="$(OutputPath)Newtonsoft.Json.dll" />
<InputAssemblies Include="$(OutputPath)System.Collections.Immutable.dll" />
<InputAssemblies Include="$(OutputPath)System.Reflection.Metadata.dll" />
</ItemGroup>
<Target Name="ILRepacker"
BeforeTargets="CopyFilesToOutputDirectory"
Inputs="$(MSBuildAllProjects);@(IntermediateAssembly);@(InputAssemblies)"
Outputs="$(IntermediateOutputPath)ILRepacker.stamp" >
<ItemGroup>
<_InputAssembliesThatExist Include="@(InputAssemblies)" Condition="Exists('%(Identity)')" />
<_NetstandardPath Include="@(ReferencePath->'%(RootDir)%(Directory)')" Condition="'%(FileName)%(Extension)' == 'netstandard.dll'" />
</ItemGroup>
<PropertyGroup>
<_NetstandardDir>@(_NetstandardPath)</_NetstandardDir>
<_ILRepackArgs>/out:"$(MSBuildThisFileDirectory)$(IntermediateOutputPath)$(AssemblyName).dll" /internalize</_ILRepackArgs>
<_ILRepackArgs>$(_ILRepackArgs) /keyfile:"$(XamarinAndroidSourcePath)product.snk"</_ILRepackArgs>
<_ILRepackArgs>$(_ILRepackArgs) "$(MSBuildThisFileDirectory)$(IntermediateOutputPath)$(AssemblyName).dll"</_ILRepackArgs>
<_ILRepackArgs>$(_ILRepackArgs) @(_InputAssembliesThatExist->'"%(Identity)"', ' ')</_ILRepackArgs>
<_ILRepackArgs>$(_ILRepackArgs) /lib:"$(_NetstandardDir.TrimEnd('\'))"</_ILRepackArgs> <!-- Path to netstandard.dll -->
</PropertyGroup>
<Exec
Command="$(ManagedRuntime) $(ManagedRuntimeArgs) "$(ILRepack)" $(_ILRepackArgs)"
WorkingDirectory="$(OutputPath)"
/>
<Touch
Files="$(IntermediateOutputPath)ILRepacker.stamp"
AlwaysCreate="True"
/>
<ItemGroup>
<FileWrites Include="$(IntermediateOutputPath)ILRepacker.stamp" />
</ItemGroup>
</Target>
<ItemGroup>
<_ExtraPackageSource Include="$(PkgXamarin_LibZipSharp)\lib\$(TargetFrameworkNETStandard)\libZipSharp.pdb" />
<_ExtraPackageTarget Include="$(OutputPath)\libZipSharp.pdb" />
<_ExtraPackageSource Include="$(PkgXamarin_Build_AsyncTask)\lib\$(TargetFrameworkNETStandard)\Xamarin.Build.AsyncTask.pdb" />
<_ExtraPackageTarget Include="$(OutputPath)\Xamarin.Build.AsyncTask.pdb" />
<_ExtraPackageSource Include="$(PkgMono_Cecil)\lib\$(TargetFrameworkNETStandard)\Mono.Cecil.pdb" />
<_ExtraPackageTarget Include="$(OutputPath)\Mono.Cecil.pdb" />
<_ExtraPackageSource Include="$(PkgMono_Cecil)\lib\$(TargetFrameworkNETStandard)\Mono.Cecil.Mdb.pdb" />
<_ExtraPackageTarget Include="$(OutputPath)\Mono.Cecil.Mdb.pdb" />
<_ExtraPackageSource Include="$(PkgMono_Unix)\lib\$(TargetFrameworkNETStandard)\Mono.Unix.pdb" />
<_ExtraPackageTarget Include="$(OutputPath)\Mono.Unix.pdb" />
<_ExtraPackageSource Include="$(PkgMavenNet)\lib\netstandard2.0\MavenNet.pdb" />
<_ExtraPackageTarget Include="$(OutputPath)\MavenNet.pdb" />
<_ExtraPackageSource Include="$(MSBuildThisFileDirectory)\Resources\Mono.Unix.dll.config" />
<_ExtraPackageTarget Include="$(OutputPath)\Mono.Unix.dll.config" />
<_ExtraPackageSource Include="$(PkgMono_Unix)\lib\$(TargetFrameworkNETStandard)\Mono.Unix.dll" />
<_ExtraPackageTarget Include="$(OutputPath)\Mono.Unix.dll" />
</ItemGroup>
<Import Project="$(XamarinAndroidSourcePath)build-tools\scripts\MonoUnixNative.targets" />
<!-- Copy package ref symbols for our installers. '$(Pkg*)' props are set during NuGet restore when GeneratePathProperty="true" -->
<Target Name="_CopyExtraPackageContent"
Inputs="@(_ExtraPackageSource)"
Outputs="@(_ExtraPackageTarget)"
DependsOnTargets="_MakeMonoUnixFatBinariesOSX">
<Copy
SourceFiles="@(_ExtraPackageSource)"
DestinationFolder="$(OutputPath)"
SkipUnchangedFiles="True"
/>
</Target>
<Target Name="_Remove32BitLinux" Condition="Exists ('$(OutputPath)lib32\libZipSharpNative.so')" AfterTargets="CopyFilesToOutputDirectory">
<Delete Files="$(OutputPath)lib32\libZipSharpNative.so" />
</Target>
<Target Name="_SetAssemblyVersion"
DependsOnTargets="GetXAVersionInfo"
BeforeTargets="GetAssemblyVersion">
<PropertyGroup>
<Version>$(ProductVersion).$(PackVersionCommitCount)</Version>
</PropertyGroup>
</Target>
<!-- Generate and include this file in our SDK for now, but we may eventually want to migrate to:
https://github.com/dotnet/installer/blob/d98f5f18bce44014aeacd2f99923b4779d89459d/src/redist/targets/GenerateBundledVersions.targets
-->
<Target Name="_GenerateBundledVersions"
DependsOnTargets="GetXAVersionInfo">
<ReplaceFileContents
SourceFile="$(MSBuildThisFileDirectory)Microsoft.Android.Sdk\in\Microsoft.Android.Sdk.BundledVersions.in.targets"
DestinationFile="$(MSBuildThisFileDirectory)\Microsoft.Android.Sdk\targets\Microsoft.Android.Sdk.BundledVersions.targets"
Replacements="@ANDROID_PACK_VERSION_LONG@=$(AndroidPackVersionLong);@ANDROID_LATEST_STABLE_API_LEVEL@=$(AndroidLatestStableApiLevel);@DOTNET_TARGET_FRAMEWORK@=$(DotNetTargetFramework)" >
</ReplaceFileContents>
</Target>
<Target Name="_CopyNetSdkTargets">
<ItemGroup>
<_SdkDirFiles Include="$(MSBuildThisFileDirectory)Microsoft.Android.Sdk\Sdk\**" />
<_SdkTargetsDirFiles Include="$(MSBuildThisFileDirectory)Microsoft.Android.Sdk\targets\**" />
<_SdkTargetsDirFiles Include="$(XamarinAndroidSourcePath)src\profiled-aot\dotnet.aotprofile" />
</ItemGroup>
<Copy
SourceFiles="@(_SdkDirFiles)"
DestinationFolder="$(MicrosoftAndroidSdkPackDir)Sdk"
SkipUnchangedFiles="true"
/>
<Copy
SourceFiles="@(_SdkTargetsDirFiles)"
DestinationFolder="$(MicrosoftAndroidSdkPackDir)targets"
SkipUnchangedFiles="true"
/>
</Target>
<ItemGroup>
<_VSExtensionTargets Include="$(MSBuildThisFileDirectory)MSBuild\Xamarin\Xamarin.Android.Sdk.props" />
<_VSExtensionTargets Include="$(MSBuildThisFileDirectory)MSBuild\Xamarin\Xamarin.Android.Sdk.targets" />
</ItemGroup>
<Target Name="_CopyVSExtensionTargets"
Inputs="@(_VSExtensionTargets)"
Outputs="@(_VSExtensionTargets->'$(XAInstallPrefix)xbuild\Xamarin\%(FileName)%(Extension)')"
DependsOnTargets="_MakeMonoUnixFatBinariesOSX">
<Copy
SourceFiles="@(_VSExtensionTargets)"
DestinationFiles="@(_VSExtensionTargets->'$(XAInstallPrefix)xbuild\Xamarin\%(FileName)%(Extension)')"
SkipUnchangedFiles="True"
/>
</Target>
<Target Name="_WriteVersionFiles"
DependsOnTargets="GetXAVersionInfo" >
<WriteLinesToFile
File="$(MicrosoftAndroidSdkOutDir)Version"
Lines="$(ProductVersion)"
Overwrite="True"
/>
<WriteLinesToFile
File="$(MicrosoftAndroidSdkOutDir)Version.commit"
Lines="$(XARepositoryName)/$(XAVersionBranch)/$(XAVersionHash)"
Overwrite="True"
/>
<WriteLinesToFile
File="$(MicrosoftAndroidSdkOutDir)Version.rev"
Lines="$(XAVersionCommitCount)"
Overwrite="True"
/>
</Target>
</Project>