Skip to content

Commit

Permalink
Drop API 31 packs & remove android-32 workload
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jonathanpeppers committed Jan 5, 2022
1 parent eb6da19 commit 38fddb7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 40 deletions.
15 changes: 10 additions & 5 deletions build-tools/create-packs/Microsoft.Android.Sdk.proj
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,23 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
<PropertyGroup>
<AndroidNETSdkVersion>$(AndroidPackVersionLong)</AndroidNETSdkVersion>
<XamarinAndroidVersion>$(AndroidPackVersionLong)</XamarinAndroidVersion>
<_AndroidRuntimePackId Condition=" '%24(TargetPlatformVersion)' != '$(AndroidLatestUnstableApiLevel).0' ">$(AndroidLatestStableApiLevel)</_AndroidRuntimePackId>
<_AndroidRuntimePackId Condition=" '%24(TargetPlatformVersion)' == '$(AndroidLatestUnstableApiLevel).0' ">$(AndroidLatestUnstableApiLevel)</_AndroidRuntimePackId>
</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"
DefaultRuntimeFrameworkVersion="**FromWorkload**"
LatestRuntimeFrameworkVersion="**FromWorkload**"
LatestRuntimeFrameworkVersion="%24(_AndroidRuntimePackVersion)"
TargetingPackName="Microsoft.Android.Ref.%24(_AndroidRuntimePackId)"
TargetingPackVersion="**FromWorkload**"
TargetingPackVersion="%24(_AndroidRuntimePackVersion)"
RuntimePackNamePatterns="Microsoft.Android.Runtime.%24(_AndroidRuntimePackId).**RID**"
RuntimePackRuntimeIdentifiers="@(_AndroidNETAppRuntimePackRids, '%3B')"
Profile="Android"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,15 @@
"description": ".NET SDK Workload for building Android applications.",
"packs": [
"Microsoft.Android.Sdk",
"Microsoft.Android.Ref.31",
"Microsoft.Android.Runtime.31.android-arm",
"Microsoft.Android.Runtime.31.android-arm64",
"Microsoft.Android.Runtime.31.android-x86",
"Microsoft.Android.Runtime.31.android-x64",
"Microsoft.Android.Templates"
],
"platforms": [ "win-x64", "linux-x64", "osx-x64", "osx-arm64" ],
"extends" : [ "microsoft-net-runtime-android" ]
},
"android-32": {
"description": "Preview support for Android API-32.",
"packs": [
"Microsoft.Android.Ref.32",
"Microsoft.Android.Runtime.32.android-arm",
"Microsoft.Android.Runtime.32.android-arm64",
"Microsoft.Android.Runtime.32.android-x86",
"Microsoft.Android.Runtime.32.android-x64"
"Microsoft.Android.Runtime.32.android-x64",
"Microsoft.Android.Templates"
],
"platforms": [ "win-x64", "linux-x64", "osx-x64", "osx-arm64" ],
"extends" : [ "android" ]
"extends" : [ "microsoft-net-runtime-android" ]
},
"android-aot": {
"description": ".NET SDK Workload for building Android applications with AOT support.",
Expand All @@ -45,26 +33,6 @@
"linux-x64": "Microsoft.Android.Sdk.Linux"
}
},
"Microsoft.Android.Ref.31": {
"kind": "framework",
"version": "@WORKLOAD_VERSION@"
},
"Microsoft.Android.Runtime.31.android-arm": {
"kind": "framework",
"version": "@WORKLOAD_VERSION@"
},
"Microsoft.Android.Runtime.31.android-arm64": {
"kind": "framework",
"version": "@WORKLOAD_VERSION@"
},
"Microsoft.Android.Runtime.31.android-x86": {
"kind": "framework",
"version": "@WORKLOAD_VERSION@"
},
"Microsoft.Android.Runtime.31.android-x64": {
"kind": "framework",
"version": "@WORKLOAD_VERSION@"
},
"Microsoft.Android.Ref.32": {
"kind": "framework",
"version": "@WORKLOAD_VERSION@"
Expand Down

0 comments on commit 38fddb7

Please sign in to comment.