Skip to content

Commit 0048908

Browse files
jonpryorjonathanpeppers
authored andcommitted
[Mono.Android] Bind API-37 Beta 3 (#11038)
Context: https://developer.android.com/about/versions/17 Context: https://android-developers.googleblog.com/2026/03/the-third-beta-of-android-17.html Android 17 Beta 3 has been released. * [API-37 Beta 3 vs. API-CinnamonBun Beta 2][0] * [API-37 Beta 3 vs. API-36.1][1] The Android 17 Beta 3 announcement states that Beta 3 is API stable. > Android 17 has officially reached platform stability today with > Beta 3. That means that the API surface is locked; you can perform > final compatibility testing and push your Android 17-targeted apps > to the Play Store. We're not yet ready to do the enumification work, though. Bind API-37 Beta 3 as an *unstable*, *un-enumified* binding. [0]: https://developer.android.com/sdk/api_diff/37-incr/changes [1]: https://developer.android.com/sdk/api_diff/37/changes
1 parent c6dcda3 commit 0048908

9 files changed

Lines changed: 4178 additions & 2014 deletions

File tree

Configuration.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
-->
3737
<!-- *Latest* *unstable* API level binding that we support; this can be the same as *stable* -->
3838
<AndroidLatestUnstableApiLevel Condition="'$(AndroidLatestUnstableApiLevel)' == ''">37</AndroidLatestUnstableApiLevel>
39-
<AndroidLatestUnstablePlatformId Condition="'$(AndroidLatestUnstablePlatformId)' == ''">CinnamonBun</AndroidLatestUnstablePlatformId>
39+
<AndroidLatestUnstablePlatformId Condition="'$(AndroidLatestUnstablePlatformId)' == ''">37</AndroidLatestUnstablePlatformId>
4040
<AndroidLatestUnstableFrameworkVersion Condition="'$(AndroidLatestUnstableFrameworkVersion)'==''">v17.0</AndroidLatestUnstableFrameworkVersion>
4141
<!-- The default API level used for $(TargetPlatformVersion) -->
4242
<AndroidDefaultTargetDotnetApiLevel Condition=" '$(AndroidDefaultTargetDotnetApiLevel)' == '' ">$(AndroidLatestStableApiLevel)</AndroidDefaultTargetDotnetApiLevel>

Documentation/workflow/HowToAddNewApiLevel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ cp src/Mono.Android/PublicAPI/API-36/* src/Mono.Android/PublicAPI/API-36.1
243243
To build *just* `src/Mono.Android/Mono.Android.csproj`:
244244
245245
```dotnetcli
246-
./dotnet-local.sh build src/Mono.Android/*.csproj -p:AndroidApiLevel=36.1 -p:AndroidPlatformId=CANARY -p:AndroidFrameworkVersion=v16.1 -p:IsUnstableVersion=true
246+
./dotnet-local.sh build -bl src/Mono.Android/*.csproj -p:AndroidApiLevel=36.1 -p:AndroidPlatformId=CANARY -p:AndroidFrameworkVersion=v16.1 -p:IsUnstableVersion=true
247247
```
248248
249249
### New AndroidManifest.xml Elements

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
<File Path="api-35.xml.in" Level="35" />
2727
<File Path="api-36.xml.in" Level="36" />
2828
<File Path="api-36.1.xml.in" Level="36.1" />
29-
<File Path="api-CinnamonBun.xml.in" Level="37" />
29+
<File Path="api-37.xml.in" Level="37" />
3030
</Inputs>
3131
<Outputs>
32-
<File Path="api-CinnamonBun.xml" LastLevel="37" />
32+
<File Path="api-37.xml" LastLevel="37" />
3333
</Outputs>
3434
</Configuration>

build-tools/automation/yaml-templates/variables.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ variables:
6363
- name: IsRelOrTargetingRel
6464
value: $[or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['System.PullRequest.TargetBranch'], 'release/'))]
6565
- name: DefaultTestSdkPlatforms # Comma-separated SDK Platform(s) to install on test agents (no spaces)
66-
value: 35,36,36.1,CinnamonBun
66+
value: 35,36,36.1,37
6767
- name: DefaultJavaSdkMajorVersion
6868
value: 17
6969
- name: LatestJavaSdkMajorVersion

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class BuildAndroidPlatforms
5050
new AndroidPlatform (apiName: "VanillaIceCream", apiLevel: 35, platformID: "35", include: "v15.0", framework: "v15.0"),
5151
new AndroidPlatform (apiName: "Baklava", apiLevel: 36, platformID: "36", include: "v16.0", framework: "v16.0"),
5252
new AndroidPlatform (apiName: "CANARY", apiLevel: new Version (36, 1), platformID: "36.1", include: "v16.1", framework: "v16.1", stable: true),
53-
new AndroidPlatform (apiName: "CinnamonBun", apiLevel: new Version (37, 0), platformID: "CinnamonBun", include: "v17.0", framework: "v17.0", stable: false),
53+
new AndroidPlatform (apiName: "CinnamonBun", apiLevel: new Version (37, 0), platformID: "37", include: "v17.0", framework: "v17.0", stable: false),
5454
};
5555

5656
}

build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/AndroidToolchain.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public AndroidToolchain ()
7575
new AndroidPlatformComponent ("platform-35_r02", apiLevel: "35", pkgRevision: "2"),
7676
new AndroidPlatformComponent ("platform-36_r02", apiLevel: "36", pkgRevision: "2"),
7777
new AndroidPlatformComponent ("platform-36.1_r01", apiLevel: "36.1", pkgRevision: "1", isLatestStable: true),
78-
new AndroidPlatformComponent ("platform-CinnamonBun_r02", apiLevel: "CinnamonBun", pkgRevision: "2", isLatestStable: false, isPreview: true),
78+
new AndroidPlatformComponent ("platform-37.0_r01", apiLevel: "37", pkgRevision: "1", isLatestStable: false, isPreview: true),
7979

8080
new AndroidToolchainComponent ("source-36_r01",
8181
destDir: Path.Combine ("sources", "android-36"),

src/Mono.Android/Profiles/api-CinnamonBun.params.txt renamed to src/Mono.Android/Profiles/api-37.params.txt

Lines changed: 382 additions & 4 deletions
Large diffs are not rendered by default.

src/Mono.Android/Profiles/api-CinnamonBun.xml renamed to src/Mono.Android/Profiles/api-37.xml

Lines changed: 3756 additions & 2003 deletions
Large diffs are not rendered by default.

src/Mono.Android/metadata

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2006,6 +2006,37 @@
20062006
name="propertyName"
20072007
></attr>
20082008

2009+
<!-- Fix CS0549 errors about adding new `virtual` methods in `sealed` types -->
2010+
<attr
2011+
api-since="37"
2012+
path="/api/package[@name='java.lang']/class[@name='StringBuffer']/method[@name='getChars' and count(parameter)=4 and parameter[1][@type='int'] and parameter[2][@type='int'] and parameter[3][@type='char[]'] and parameter[4][@type='int']]"
2013+
name="managedOverride"
2014+
>none</attr>
2015+
<attr
2016+
api-since="37"
2017+
path="/api/package[@name='java.lang']/class[@name='StringBuilder']/method[@name='getChars' and count(parameter)=4 and parameter[1][@type='int'] and parameter[2][@type='int'] and parameter[3][@type='char[]'] and parameter[4][@type='int']]"
2018+
name="managedOverride"
2019+
>none</attr>
2020+
2021+
<!-- Covariant return type methods need to be emitted as `override` -->
2022+
<attr
2023+
api-since="37"
2024+
path="/api/package[@name='android.view']/class[@name='RoundedRectBlurRegion']/method[@name='copy' and count(parameter)=0]"
2025+
name="managedOverride"
2026+
>override</attr>
2027+
2028+
<!-- Fix CS0534+CS0549: method *should* be `override`, but is instead emitted as `virtual`, resulting in two errors for one method! -->
2029+
<attr
2030+
api-since="37"
2031+
path="/api/package[@name='android.text']/class[@name='SpannedString']/method[@name='getChars' and count(parameter)=4 and parameter[1][@type='int'] and parameter[2][@type='int'] and parameter[3][@type='char[]'] and parameter[4][@type='int']]"
2032+
name="managedOverride"
2033+
>override</attr>
2034+
<attr
2035+
api-since="37"
2036+
path="/api/package[@name='android.text']/class[@name='SpannableString']/method[@name='getChars' and count(parameter)=4 and parameter[1][@type='int'] and parameter[2][@type='int'] and parameter[3][@type='char[]'] and parameter[4][@type='int']]"
2037+
name="managedOverride"
2038+
>override</attr>
2039+
20092040
<!--
20102041
***********************************************************************
20112042
THE FOLLOWING LINES MUST BE CREATED FOR ANY NEW PLATFORM THAT IS ADDED.
@@ -2037,6 +2068,7 @@
20372068
<attr api-since="36.1" path="/api/package[contains(@merge.SourceFile,'api-CANARY.xml.in')]/interface" name="no-alternatives">true</attr>
20382069
<attr api-since="36.1" path="/api/package[contains(@merge.SourceFile,'api-36.1.xml.in')]/interface" name="no-alternatives">true</attr>
20392070
<attr api-since="37" path="/api/package[contains(@merge.SourceFile,'api-CinnamonBun.xml.in')]/interface" name="no-alternatives">true</attr>
2071+
<attr api-since="37" path="/api/package[contains(@merge.SourceFile,'api-37.xml.in')]/interface" name="no-alternatives">true</attr>
20402072

20412073
<!-- Set ApiSince based on merge sourcefile. -->
20422074
<attr api-since="22" path="/api//*[contains(@merge.SourceFile,'api-22.xml.in')]" name="api-since">22</attr>
@@ -2064,6 +2096,7 @@
20642096
<attr api-since="36.1" path="/api//*[contains(@merge.SourceFile,'api-CANARY.xml.in')]" name="api-since">36.1</attr>
20652097
<attr api-since="36.1" path="/api//*[contains(@merge.SourceFile,'api-36.1.xml.in')]" name="api-since">36.1</attr>
20662098
<attr api-since="37" path="/api//*[contains(@merge.SourceFile,'api-CinnamonBun.xml.in')]" name="api-since">37</attr>
2099+
<attr api-since="37" path="/api//*[contains(@merge.SourceFile,'api-37.xml.in')]" name="api-since">37</attr>
20672100

20682101
<!-- Erase some 'api-since' attributes (This has to be done after they are set above) -->
20692102

0 commit comments

Comments
 (0)