[Mono.Android] Bind API-37.2 Beta 3 - #12421
Open
jonpryor wants to merge 3 commits into
Open
Conversation
jonpryor
requested review from
jonathanpeppers and
simonrozsival
as code owners
August 18, 2026 15:43
jonpryor
force-pushed
the
dev/jonpryor/jonp-bind-api-37.2
branch
2 times, most recently
from
August 18, 2026 20:06
a39f174 to
86ab624
Compare
Context: https://developer.android.com/about/versions/17/qpr2 Context: ec3d578 Context: 932224b Android 17 QPR2 has been released. * [API-37.2 Beta 3 vs. API-37][0] Additionally, Google appears to be changing things up. For API-36*, there were two releases: 36 and 36.1, with API-36.1 being introduced in QPR2 (Quarterly Platform Release 2), and there were no other point releases for API-36*. This year, API-37.1 was introduced in *QPR1*, and API-37.2 is being introduced in QPR2. Which means the `TODO` assumptions from ec3d578 within `GetAndroidDefineConstants.cs` are no longer valid, so bump that to *4*, just in case. As with API-37.1, @jonpryor cannot find a release announcement, so there isn't a lot to link to. Step 1: bind it! Step 2: Enumify it, make stable. This is Step 1. We consider this binding *unstable* until we complete enumification (Step 2). Additionally, the "auto `Color`" logic in 932224b introduces an error: …/Android.Resource.cs(841,11): error CS0283: The type 'Color' cannot be declared const Update the `//field` metadata changes from 932224b so that `final` fields aren't turned into `Color` instances. These fields will remain as `int` fields. [0]: https://developer.android.com/sdk/api_diff/c-2-beta3/changes
The *existence* of an Android QPR1 API-37.1 release alongside an Android QPR2 API-37.2 beta release throws us into a new scenario: the need for (at least?) *three* workload packs: * API-37 [stable] * API-37.1 [currently unstable, but see dotnet#12418] * API-37.2 [unstable] (It would not surprise @jonpryor if there's a 4th by the time we're done with API-37.*…) However, thus far we've only ever expected *two* packages, so the need for a third is unique. Add a new `@(AndroidBuildApiLevel)` item group to `Configuration.props`, which lists all the Android API levels to build, along with the information required to build them (associated framework version, platform id, is it *unstable*). Update `ConfigureWorkload.targets` so that instead of "hardcoding" `@(_FrameworkListOutputs)` against a specific list of of API levels (`$(AndroidDefaultTargetDotnetApiLevel)` {?!}, `$(AndroidLatestStableApiLevel)`, `$(AndroidLatestUnstableApiLevel)`), it uses `@(AndroidBuildApiLevel)`. However, MSBuild item expansion *does not like* using multiple item groups, e.g.: <_RuntimeListOutputs Include="…%(AndroidAbiAndRuntimeFlavor.AndroidRuntime).%(AndroidBuildApiLevel.Identity)…" /> Work around this problem by using a "cross join" across item groups by using an intermediate Target + `@(_AndroidBuildInfo)` item group, allowing use of a *single* item group: <_RuntimeListOutputs Include="…%(_AndroidBuildInfo.AndroidRuntime).%(_AndroidBuildInfo.Identity)…" /> Update the `BuildExtraApiLevels` target to build all API levels within `@(AndroidBuildApiLevel)`, overriding MSBuild properties based on the `@(AndroidBuildApiLevel)` item metadata. Update `tests` so that the `_AddMonoAndroidReference` target finds and uses *stable* bindings. If it references an *unstable* binding, we get a bunch of CS0246 errors as *nothing can be found*, as `-p:EnablePreviewFeatures=true` is required when referencing an unstable binding…
jonpryor
force-pushed
the
dev/jonpryor/jonp-bind-api-37.2
branch
from
August 19, 2026 19:40
86ab624 to
b35741e
Compare
Use AndroidBuildApiLevel as the source of truth for targeting pack selection, pack creation, local workload setup, and preview platform dependencies. Preserve API 37.1 while adding API 37.2 coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 00e1eb98-68d9-4047-a6b3-d3af6ddcd4a6
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context: https://developer.android.com/about/versions/17/qpr2
Context: ec3d578
Android 17 QPR2 has been released.
Additionally, Google appears to be changing things up. For API-36*, there were two releases: 36 and 36.1, with API-36.1 being introduced in QPR2 (Quarterly Platform Release 2), and there were no other point releases for API-36*.
This year, API-37.1 was introduced in QPR1, and API-37.2 is being introduced in QPR2. Which means the
TODOassumptions from ec3d578 withinGetAndroidDefineConstants.csare no longer valid, so bump that to 4, just in case.As with API-37.1, @jonpryor cannot find a release announcement, so there isn't a lot to link to.
Step 1: bind it!
Step 2: Enumify it, make stable.
This is Step 1. We consider this binding unstable until we complete enumification (Step 2).
Pull Request
title and
description
should follow the
commit-messages.mdworkflow documentation, and in particular should include: