Skip to content

Commit 2181e78

Browse files
authored
[Mono.Android] API-30 stabilization (#4830)
Context: https://developer.android.com/android11 Changes: https://github.com/xamarin/monodroid/compare/6d05c4929db1ba12ba3a04174938256e435dbbd4...fb5542fa193d5daef1c907f172e0775f9ea4b0d2 * xamarin/monodroid@fb5542fa1 [Make.config] Update API-R to API-30 (#1102) API-30 has been enumified (8f9c638). Time to declare it stable! Set API-R as API-30, v11.0, and stable. Update unit test files so `$(TargetFrameworkVersion)`= v11.0 (API-30). Rename `src/Mono.Android/Profiles/api-R.params.txt` to `api-30.params.txt`, to match the stable API-level ID. Updated `tests/api-compatibility/acceptable-breakages-vReference.txt` because the default API compare will now be against `API-30`, not `API-29`, and we deliberately removed the `XxxConst` classes which were `[Obsolete]`d 5+ years ago in API-30, resulting in an intentional API break. TODO: * `jnimarshalmethod-gen.exe` tests were disabled as they ran into a [runtime crash][0]. Once the runtime crash is fixed, we need to update `src/Mono.Android/Test/Mono.Android-Tests.csproj` so that `$(AndroidGenerateJniMarshalMethods)` is True when `'$(HostOS)' == 'Darwin'`. [0]: dotnet/runtime#34389
1 parent d44e48a commit 2181e78

File tree

19 files changed

+185
-21
lines changed

19 files changed

+185
-21
lines changed

.external

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
xamarin/monodroid:master@6d05c4929db1ba12ba3a04174938256e435dbbd4
1+
xamarin/monodroid:master@fb5542fa193d5daef1c907f172e0775f9ea4b0d2
22
mono/mono:2020-02@87ef5557017a8d822ae31587846a54fcd66daf1b

Configuration.Override.props.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
kept consistent with each other, lest Bad Things Happen™
77
-->
88
<!-- The default Android API level to bind in src/Mono.Android -->
9-
<AndroidApiLevel>29</AndroidApiLevel>
9+
<AndroidApiLevel>30</AndroidApiLevel>
1010
<!-- The Xamarin.Android $(TargetFrameworkVersion) value that corresponds to $(AndroidApiLevel) -->
11-
<AndroidFrameworkVersion>v10.0</AndroidFrameworkVersion>
11+
<AndroidFrameworkVersion>v11.0</AndroidFrameworkVersion>
1212
<!-- The default Android API "id" that corresponds to $(AndroidApiLevel) -->
13-
<AndroidPlatformId>29</AndroidPlatformId>
13+
<AndroidPlatformId>30</AndroidPlatformId>
1414

1515
<!--
1616
Colon-separated list of ABIs to build the mono JIT for.

Configuration.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
<AndroidFirstPlatformId Condition="'$(AndroidFirstPlatformId)' == ''">$(AndroidFirstApiLevel)</AndroidFirstPlatformId>
2424
<_IsRunningNuGetRestore Condition="$(RestoreTaskAssemblyFile.EndsWith('NuGet.exe', StringComparison.InvariantCultureIgnoreCase))">True</_IsRunningNuGetRestore>
2525
<!-- *Latest* *stable* API level binding that we support; used when building src/Xamarin.Android.Build.Tasks -->
26-
<AndroidLatestStableApiLevel Condition="'$(AndroidLatestStableApiLevel)' == ''">29</AndroidLatestStableApiLevel>
26+
<AndroidLatestStableApiLevel Condition="'$(AndroidLatestStableApiLevel)' == ''">30</AndroidLatestStableApiLevel>
2727
<AndroidLatestStablePlatformId Condition="'$(AndroidLatestStablePlatformId)' == ''">$(AndroidLatestStableApiLevel)</AndroidLatestStablePlatformId>
28-
<AndroidLatestStableFrameworkVersion Condition="'$(AndroidLatestStableFrameworkVersion)'==''">v10.0</AndroidLatestStableFrameworkVersion>
28+
<AndroidLatestStableFrameworkVersion Condition="'$(AndroidLatestStableFrameworkVersion)'==''">v11.0</AndroidLatestStableFrameworkVersion>
2929
<!-- The API level and TargetFrameworkVersion for the default Mono.Android.dll build -->
3030
<AndroidApiLevel Condition=" '$(AndroidApiLevel)' == '' ">$(AndroidLatestStableApiLevel)</AndroidApiLevel>
3131
<AndroidPlatformId Condition=" '$(AndroidPlatformId)' == '' ">$(AndroidLatestStablePlatformId)</AndroidPlatformId>

Documentation/building/windows/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ After the solution has built successfully, you can [use your
4242
build][using-your-build] to build Xamarin.Android application and library
4343
projects. Note that by default `Xamarin.Android.sln` only builds support for
4444
the `$(TargetFrameworkVersion)` specified in the `$(AndroidFrameworkVersion)`
45-
property of the [`Configuration.props`][configprops-master] file (`v10.0` when
45+
property of the [`Configuration.props`][configprops-master] file (`v11.0` when
4646
this guide was last updated), so you will need to ensure that your application
4747
and library projects are configured to use that particular target framework
4848
version.

build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/CheckApiCompatibility.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public sealed class CheckApiCompatibility : Task
2727
{ "v8.1", "v8.0" },
2828
{ "v9.0", "v8.1" },
2929
{ "v10.0", "v9.0" },
30-
{ "v10.0.99", "v10.0" },
30+
{ "v11.0", "v10.0" },
3131
};
3232

3333
static readonly string assemblyToValidate = "Mono.Android.dll";

build-tools/api-merge/merge-configuration.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<File Path="api-27.xml.in" Level="27" />
1919
<File Path="api-28.xml.in" Level="28" />
2020
<File Path="api-29.xml.in" Level="29" />
21-
<File Path="api-R.xml.in" Level="R" />
21+
<File Path="api-30.xml.in" Level="30" />
2222
</Inputs>
2323
<Outputs>
2424
<File Path="android-19\mcw\api.xml" LastLevel="19" />
@@ -32,6 +32,6 @@
3232
<File Path="android-27\mcw\api.xml" LastLevel="27" />
3333
<File Path="android-28\mcw\api.xml" LastLevel="28" />
3434
<File Path="android-29\mcw\api.xml" LastLevel="29" />
35-
<File Path="android-R\mcw\api.xml" LastLevel="R" />
35+
<File Path="android-30\mcw\api.xml" LastLevel="30" />
3636
</Outputs>
3737
</Configuration>

build-tools/api-xml-adjuster/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ API_XML_TOOL = $(BUILDBIN)/api-xml-adjuster.exe
1717
RUNTIME = mono --debug
1818
RUN_CLASS_PARSE = $(RUNTIME) $(CLASS_PARSE)
1919
RUN_API_XML_TOOL = $(RUNTIME) $(API_XML_TOOL)
20-
API_LEVELS = 10 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 R
20+
API_LEVELS = 10 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
2121

2222
XML_OUTPUT_DIR = .
2323

build-tools/xaprepare/xaprepare/ConfigAndData/BuildAndroidPlatforms.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class BuildAndroidPlatforms
3838
new AndroidPlatform (apiName: "Oreo", apiLevel: 27, platformID: "27", include: "v8.1", framework: "v8.1"),
3939
new AndroidPlatform (apiName: "Pie", apiLevel: 28, platformID: "28", include: "v9.0", framework: "v9.0"),
4040
new AndroidPlatform (apiName: "Q", apiLevel: 29, platformID: "29", include: "v10.0", framework: "v10.0"),
41-
new AndroidPlatform (apiName: "R", apiLevel: 30, platformID: "R", include: "v10.0.99", framework: "v10.0.99", stable: false),
41+
new AndroidPlatform (apiName: "R", apiLevel: 30, platformID: "30", include: "v11.0", framework: "v11.0"),
4242
};
4343

4444
public static readonly Dictionary<string, uint> NdkMinimumAPI = new Dictionary<string, uint> {
File renamed without changes.

src/Mono.Android/Test/Java.Interop-Tests/Java.Interop-Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<FileAlignment>512</FileAlignment>
1616
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
1717
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
18-
<TargetFrameworkVersion>v10.0</TargetFrameworkVersion>
18+
<TargetFrameworkVersion>v11.0</TargetFrameworkVersion>
1919
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
2020
<SignAssembly>true</SignAssembly>
2121
<AssemblyOriginatorKeyFile>..\..\..\..\product.snk</AssemblyOriginatorKeyFile>

0 commit comments

Comments
 (0)