Skip to content

Commit 38fddb7

Browse files
Drop API 31 packs & remove android-32 workload
You should still be able to target `net6.0-android31`, as I hardcoded the version to what is released on NuGet.org: https://www.nuget.org/packages/Microsoft.Android.Ref.31/31.0.101-preview.11.117 With these changes `net6.0-android31` resolves from: ~\.nuget\packages\microsoft.android.ref.31\31.0.101-preview.11.117\ref\net6.0\Mono.Android.dll But with `net6.0-android` (defaults to 32 now), you get: dotnet\packs\Microsoft.Android.Ref.32\*\ref\net6.0\Mono.Android.dll I also removed `%(DefaultRuntimeFrameworkVersion)` from `@(KnownFrameworkReference)` as it is not needed.
1 parent eb6da19 commit 38fddb7

File tree

2 files changed

+13
-40
lines changed

2 files changed

+13
-40
lines changed

build-tools/create-packs/Microsoft.Android.Sdk.proj

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,18 +118,23 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
118118
<PropertyGroup>
119119
<AndroidNETSdkVersion>$(AndroidPackVersionLong)</AndroidNETSdkVersion>
120120
<XamarinAndroidVersion>$(AndroidPackVersionLong)</XamarinAndroidVersion>
121-
<_AndroidRuntimePackId Condition=" '%24(TargetPlatformVersion)' != '$(AndroidLatestUnstableApiLevel).0' ">$(AndroidLatestStableApiLevel)</_AndroidRuntimePackId>
122-
<_AndroidRuntimePackId Condition=" '%24(TargetPlatformVersion)' == '$(AndroidLatestUnstableApiLevel).0' ">$(AndroidLatestUnstableApiLevel)</_AndroidRuntimePackId>
121+
</PropertyGroup>
122+
<PropertyGroup Condition=" '%24(TargetPlatformVersion)' == '31.0' ">
123+
<_AndroidRuntimePackId>31</_AndroidRuntimePackId>
124+
<_AndroidRuntimePackVersion>31.0.101-preview.11.117</_AndroidRuntimePackVersion>
125+
</PropertyGroup>
126+
<PropertyGroup>
127+
<_AndroidRuntimePackId Condition=" '%24(_AndroidRuntimePackId)' == '' ">$(AndroidLatestStableApiLevel)</_AndroidRuntimePackId>
128+
<_AndroidRuntimePackVersion Condition=" '%24(_AndroidRuntimePackVersion)' == '' ">**FromWorkload**</_AndroidRuntimePackVersion>
123129
</PropertyGroup>
124130
<ItemGroup>
125131
<KnownFrameworkReference
126132
Include="Microsoft.Android"
127133
TargetFramework="$(_AndroidNETAppTargetFramework)"
128134
RuntimeFrameworkName="Microsoft.Android"
129-
DefaultRuntimeFrameworkVersion="**FromWorkload**"
130-
LatestRuntimeFrameworkVersion="**FromWorkload**"
135+
LatestRuntimeFrameworkVersion="%24(_AndroidRuntimePackVersion)"
131136
TargetingPackName="Microsoft.Android.Ref.%24(_AndroidRuntimePackId)"
132-
TargetingPackVersion="**FromWorkload**"
137+
TargetingPackVersion="%24(_AndroidRuntimePackVersion)"
133138
RuntimePackNamePatterns="Microsoft.Android.Runtime.%24(_AndroidRuntimePackId).**RID**"
134139
RuntimePackRuntimeIdentifiers="@(_AndroidNETAppRuntimePackRids, '%3B')"
135140
Profile="Android"

src/Xamarin.Android.Build.Tasks/Microsoft.NET.Sdk.Android/WorkloadManifest.in.json

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,15 @@
55
"description": ".NET SDK Workload for building Android applications.",
66
"packs": [
77
"Microsoft.Android.Sdk",
8-
"Microsoft.Android.Ref.31",
9-
"Microsoft.Android.Runtime.31.android-arm",
10-
"Microsoft.Android.Runtime.31.android-arm64",
11-
"Microsoft.Android.Runtime.31.android-x86",
12-
"Microsoft.Android.Runtime.31.android-x64",
13-
"Microsoft.Android.Templates"
14-
],
15-
"platforms": [ "win-x64", "linux-x64", "osx-x64", "osx-arm64" ],
16-
"extends" : [ "microsoft-net-runtime-android" ]
17-
},
18-
"android-32": {
19-
"description": "Preview support for Android API-32.",
20-
"packs": [
218
"Microsoft.Android.Ref.32",
229
"Microsoft.Android.Runtime.32.android-arm",
2310
"Microsoft.Android.Runtime.32.android-arm64",
2411
"Microsoft.Android.Runtime.32.android-x86",
25-
"Microsoft.Android.Runtime.32.android-x64"
12+
"Microsoft.Android.Runtime.32.android-x64",
13+
"Microsoft.Android.Templates"
2614
],
2715
"platforms": [ "win-x64", "linux-x64", "osx-x64", "osx-arm64" ],
28-
"extends" : [ "android" ]
16+
"extends" : [ "microsoft-net-runtime-android" ]
2917
},
3018
"android-aot": {
3119
"description": ".NET SDK Workload for building Android applications with AOT support.",
@@ -45,26 +33,6 @@
4533
"linux-x64": "Microsoft.Android.Sdk.Linux"
4634
}
4735
},
48-
"Microsoft.Android.Ref.31": {
49-
"kind": "framework",
50-
"version": "@WORKLOAD_VERSION@"
51-
},
52-
"Microsoft.Android.Runtime.31.android-arm": {
53-
"kind": "framework",
54-
"version": "@WORKLOAD_VERSION@"
55-
},
56-
"Microsoft.Android.Runtime.31.android-arm64": {
57-
"kind": "framework",
58-
"version": "@WORKLOAD_VERSION@"
59-
},
60-
"Microsoft.Android.Runtime.31.android-x86": {
61-
"kind": "framework",
62-
"version": "@WORKLOAD_VERSION@"
63-
},
64-
"Microsoft.Android.Runtime.31.android-x64": {
65-
"kind": "framework",
66-
"version": "@WORKLOAD_VERSION@"
67-
},
6836
"Microsoft.Android.Ref.32": {
6937
"kind": "framework",
7038
"version": "@WORKLOAD_VERSION@"

0 commit comments

Comments
 (0)