-
Notifications
You must be signed in to change notification settings - Fork 533
/
Microsoft.Android.Sdk.proj
153 lines (139 loc) · 8.84 KB
/
Microsoft.Android.Sdk.proj
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
<!--
***********************************************************************************************
Microsoft.Android.Sdk.proj
This project file is used to create the Microsoft.Android.Sdk.$(HostOS) NuGets, which are the
core workload SDK packs imported by WorkloadManifest.targets.
***********************************************************************************************
-->
<Project Sdk="Microsoft.Build.NoTargets">
<UsingTask AssemblyFile="$(BootstrapTasksAssembly)" TaskName="Xamarin.Android.Tools.BootstrapTasks.GenerateUnixFilePermissions" />
<PropertyGroup>
<PackageId>Microsoft.Android.Sdk.$(HostOS)</PackageId>
<Description>C# Tools and Bindings for the Android SDK</Description>
<!-- Exclude mono bundle components declared in `create-installers.targets`. -->
<IncludeMonoBundleComponents>false</IncludeMonoBundleComponents>
</PropertyGroup>
<PropertyGroup>
<BeforePack>
_GenerateXASdkContent;
$(BeforePack);
</BeforePack>
</PropertyGroup>
<Target Name="_GenerateXASdkContent"
DependsOnTargets="ConstructInstallerItems;_GenerateBundledVersions;_GetLicense">
<PropertyGroup>
<ToolsSourceDir>$(XamarinAndroidSourcePath)bin\Build$(Configuration)\packs\tools\</ToolsSourceDir>
<NetCoreAppToolsSourceDir>$(XamarinAndroidSourcePath)bin\$(Configuration)-net6.0\</NetCoreAppToolsSourceDir>
</PropertyGroup>
<ItemGroup>
<AndroidSdkBuildTools Include="@(_MSBuildFiles)" >
<RelativePath>$([MSBuild]::MakeRelative($(MSBuildSrcDir), %(FullPath)))</RelativePath>
</AndroidSdkBuildTools>
<AndroidSdkBuildTools Include="@(_MSBuildTargetsSrcFiles)" >
<RelativePath>$([MSBuild]::MakeRelative($(MSBuildTargetsSrcDir), %(FullPath)))</RelativePath>
</AndroidSdkBuildTools>
<AndroidSdkBuildTools Include="@(_MSBuildFilesWin)" Condition=" '$(HostOS)' == 'Windows' ">
<RelativePath>$([MSBuild]::MakeRelative($(MSBuildSrcDir), %(FullPath)))</RelativePath>
</AndroidSdkBuildTools>
<AndroidSdkBuildTools Include="@(_MSBuildFilesUnix);@(_MSBuildFilesUnixSign);@(_MSBuildFilesUnixSignAndHarden)" Condition=" '$(HostOS)' == 'Linux' or '$(HostOS)' == 'Darwin' ">
<RelativePath>$([MSBuild]::MakeRelative($(MSBuildSrcDir), %(FullPath)))</RelativePath>
</AndroidSdkBuildTools>
<!-- Remove items with '%(ExcludeFromAndroidNETSdk)' == 'true' metadata -->
<AndroidSdkBuildTools Remove="@(AndroidSdkBuildTools)" Condition=" '%(AndroidSdkBuildTools.ExcludeFromAndroidNETSdk)' == 'true' " />
</ItemGroup>
<RemoveDir Directories="$(ToolsSourceDir)" />
<Copy
SourceFiles="@(AndroidSdkBuildTools)"
DestinationFiles="@(AndroidSdkBuildTools->'$(ToolsSourceDir)%(RelativePath)')"
/>
<GenerateUnixFilePermissions
Condition=" '$(HostOS)' != 'Windows' "
Output="$(IntermediateOutputPath)UnixFilePermissions.xml"
PackagePath="tools"
Files="@(AndroidSdkBuildTools)"
/>
<ItemGroup>
<_AndroidApiInfo Include="$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\net6.0-android$(AndroidLatestStableApiLevel)\AndroidApiInfo.xml" />
<_AndroidApiInfo Include="$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\net6.0-android$(AndroidLatestUnstableApiLevel)\AndroidApiInfo.xml" Condition="Exists('$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\net6.0-android$(AndroidLatestUnstableApiLevel)\AndroidApiInfo.xml')" />
<!-- Microsoft.Android.Sdk.ILLink output -->
<_PackageFiles Include="$(XAInstallPrefix)xbuild\Xamarin\Android\Microsoft.Android.Sdk.ILLink.dll" PackagePath="tools" />
<_PackageFiles Include="$(XAInstallPrefix)xbuild\Xamarin\Android\Microsoft.Android.Sdk.ILLink.pdb" PackagePath="tools" />
<_PackageFiles Include="$(XAInstallPrefix)xbuild\Xamarin\Android\%(_LocalizationLanguages.Identity)\Microsoft.Android.Sdk.ILLink.resources.dll" PackagePath="tools\%(_LocalizationLanguages.Identity)" />
<_PackageFiles Include="$(ToolsSourceDir)**" PackagePath="tools" />
<_PackageFiles Include="$(NetCoreAppToolsSourceDir)class-parse.dll" PackagePath="tools" />
<_PackageFiles Include="$(NetCoreAppToolsSourceDir)class-parse.pdb" PackagePath="tools" />
<_PackageFiles Include="$(NetCoreAppToolsSourceDir)class-parse.runtimeconfig.json" PackagePath="tools" />
<_PackageFiles Include="$(NetCoreAppToolsSourceDir)generator.dll" PackagePath="tools" />
<_PackageFiles Include="$(NetCoreAppToolsSourceDir)generator.pdb" PackagePath="tools" />
<_PackageFiles Include="$(NetCoreAppToolsSourceDir)generator.runtimeconfig.json" PackagePath="tools" />
<_PackageFiles Include="$(NetCoreAppToolsSourceDir)javadoc-to-mdoc.dll" PackagePath="tools" />
<_PackageFiles Include="$(NetCoreAppToolsSourceDir)javadoc-to-mdoc.pdb" PackagePath="tools" />
<_PackageFiles Include="$(NetCoreAppToolsSourceDir)javadoc-to-mdoc.runtimeconfig.json" PackagePath="tools" />
<_PackageFiles Include="$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\Version*" PackagePath="tools" />
<_PackageFiles Include="$(XamarinAndroidSourcePath)src\Xamarin.Android.Build.Tasks\Microsoft.Android.Sdk\Sdk\**" PackagePath="Sdk" />
<_PackageFiles Include="$(XamarinAndroidSourcePath)src\Microsoft.Android.Sdk.ILLink\PreserveLists\**" PackagePath="PreserveLists" />
<_PackageFiles Include="$(XamarinAndroidSourcePath)src\Xamarin.Android.Build.Tasks\Microsoft.Android.Sdk\targets\**" PackagePath="targets" />
<_PackageFiles Include="$(XamarinAndroidSourcePath)src\Xamarin.Android.Build.Tasks\dotnet.aotprofile" PackagePath="targets" />
<_PackageFiles Include="@(_AndroidApiInfo)" DirectoryName="$([System.IO.Path]::GetDirectoryName ('%(Identity)'))" PackagePath="data\$([System.IO.Path]::GetFileName ('%(_PackageFiles.DirectoryName)'))" />
<_PackageFiles Include="$(IntermediateOutputPath)UnixFilePermissions.xml" PackagePath="data" Condition=" '$(HostOS)' != 'Windows' " />
<None Include="$(MSBuildThisFileDirectory)SignList.xml" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
</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="_GetDefaultPackageVersion" >
<PropertyGroup>
<_AndroidNETAppTargetFramework>net6.0</_AndroidNETAppTargetFramework>
<BundledVersionsFileName>Microsoft.Android.Sdk.BundledVersions.targets</BundledVersionsFileName>
</PropertyGroup>
<ItemGroup>
<_AndroidNETAppRuntimePackRids Include="android-arm;android-arm64;android-x86;android-x64" />
</ItemGroup>
<PropertyGroup>
<BundledVersionsContent>
<![CDATA[
<!--
***********************************************************************************************
$(BundledVersionsFileName)
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
***********************************************************************************************
-->
<Project>
<PropertyGroup>
<AndroidNETSdkVersion>$(AndroidPackVersionLong)</AndroidNETSdkVersion>
<XamarinAndroidVersion>$(AndroidPackVersionLong)</XamarinAndroidVersion>
</PropertyGroup>
<PropertyGroup Condition=" '%24(TargetPlatformVersion)' == '31.0' ">
<_AndroidRuntimePackId>31</_AndroidRuntimePackId>
<_AndroidRuntimePackVersion>31.0.101-preview.11.117</_AndroidRuntimePackVersion>
</PropertyGroup>
<PropertyGroup>
<_AndroidRuntimePackId Condition=" '%24(_AndroidRuntimePackId)' == '' ">$(AndroidLatestStableApiLevel)</_AndroidRuntimePackId>
<_AndroidRuntimePackVersion Condition=" '%24(_AndroidRuntimePackVersion)' == '' ">**FromWorkload**</_AndroidRuntimePackVersion>
</PropertyGroup>
<ItemGroup>
<KnownFrameworkReference
Include="Microsoft.Android"
TargetFramework="$(_AndroidNETAppTargetFramework)"
RuntimeFrameworkName="Microsoft.Android"
LatestRuntimeFrameworkVersion="%24(_AndroidRuntimePackVersion)"
TargetingPackName="Microsoft.Android.Ref.%24(_AndroidRuntimePackId)"
TargetingPackVersion="%24(_AndroidRuntimePackVersion)"
RuntimePackNamePatterns="Microsoft.Android.Runtime.%24(_AndroidRuntimePackId).**RID**"
RuntimePackRuntimeIdentifiers="@(_AndroidNETAppRuntimePackRids, '%3B')"
Profile="Android"
/>
</ItemGroup>
</Project>
]]>
</BundledVersionsContent>
</PropertyGroup>
<WriteLinesToFile File="$(XamarinAndroidSourcePath)src\Xamarin.Android.Build.Tasks\Microsoft.Android.Sdk\targets\$(BundledVersionsFileName)"
Lines="$(BundledVersionsContent)"
Overwrite="true" />
</Target>
</Project>