forked from dotnet/android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mono.Android] Bind Android 12L Beta 1. (dotnet#6601)
Context: https://developer.android.com/about/versions/12/12L Context: https://android-developers.googleblog.com/2021/12/beta-1-update-for-12l-feature-drop.html Android 12L Developer Beta 1 has been released. * [API diff vs. API-31][0] * [API diff vs. Sv2 DP1][1] The Android 12L Developer Preview Program Overview [Timeline and updates][2] section suggests the following timeline (which differs from ef01121): * October: Developer Preview 1 * December: Beta 1; Final APIs (previously expected in Beta 2) * January: Beta 2; Incremental beta update * February: Beta 3; Incremental beta update * Q1 2022: Final release In particular, Beta 1 has "Final APIs". We now have API-32! Enumify API-32, and declare it stable. As a change from "upstream Google", Classic Xamarin.Android uses `$(TargetFrameworkVersion)`=v12.1 for API-32, as there is no way to express "12L" in a `System.Version`. We have decreed 12.1 as 12L. .NET SDK for Android uses `$(TargetFramework)`=net6.0-android32.0. However, we don't want to change the default API level for .NET 6 projects; the default will remain `net6.0-android31.0` (API-31), using the [31.0.101-preview.11.117 binaries on NuGet.org][3]. This requires various changes to the unit test infrastructure and .NET SDK workflow package creation. Additionally, `d8` doesn't appear to support API-32 yet (?!); building an app with an `AndroidManifest.xml` containing: <uses-sdk android:minSdkVersion="32" android:targetSdkVersion="32" /> would use `d8 --min-api 32`, which results in a warning: D8 : warning : An API level of 32 is not supported by this compiler. Please use an API level of 31 or earlier Update the `XASdkTests.SupportedOSPlatformVersion()` test so that it only uses API-31 and not API-32. This avoids the above warning. Finally, we had to update xaprepare to install the new Android SDK Build-tools version 32.0.0, as `aapt` from previous Build-tools versions would emit a warning when building for API-32: Xamarin.Android.Aapt2.targets(157,3): warning APT2000: aapt2 W 01-05 23:58:06 8352 43857 LoadedArsc.cpp:657] Unknown chunk type '200'. Unfortunately, installing Build-tools 32.0.0 promptly broke unit tests using `$(AndroidDexTool)`=dx, with: COMPILETODALVIK : error : Unable to access jarfile C:\…\android-toolchain\sdk\build-tools\32.0.0\lib\dx.jar as Build-tools 31 and later no longer contains `lib/dx.jar`. Update xaprepare to install *both* Build-tools 30.0.3 *and* 32.0.0, so that tests which require `dx.jar` continue to run, and we can get *some* test coverage against Build-tools 32. Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com> [0]: https://developer.android.com/sdk/api_diff/32/changes [1]: https://developer.android.com/sdk/api_diff/32-incr/changes [2]: https://web.archive.org/web/20220113142518/https://developer.android.com/about/versions/12/12L/overview [3]: https://www.nuget.org/packages/Microsoft.Android.Ref.31/31.0.101-preview.11.117
- Loading branch information
Showing
34 changed files
with
348 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.