RDMR-1420 Adopt Gradle 9 / AGP 9 and target API 37 - #39
Merged
Conversation
EiyuuZack
force-pushed
the
feat/RDMR-1420/agp9
branch
2 times, most recently
from
August 5, 2026 11:21
5972659 to
171ca56
Compare
EiyuuZack
requested review from
a team,
Chuckytuh,
OS-kepatotorica,
OS-ruialves,
benmccarty91,
trevor-lambert and
usernuno
and removed request for
a team
August 5, 2026 11:51
benmccarty91
approved these changes
Aug 5, 2026
AGP 9 ships built-in Kotlin and hard-fails when the standalone kotlin-android plugin is applied, and MABS 13 ships no AGP < 9, so the KGP wiring — the apply, both classpath entries, kotlinOptions and the explicit stdlib dependency — is removed outright rather than gated. GradlePluginKotlinEnabled (including plugin.xml-injected preferences, e.g. FCM and InAppBrowser) degrades to an informational log line; built-in Kotlin compiles plugin sources with no wiring at all. References https://outsystemsrd.atlassian.net/browse/RDMR-1420
AGP 9 flips defaults that break common plugin gradle code: the legacy variant API and old DSL types are hidden, and resValue declarations stop working. Customer plugins can't be migrated from here, so prepare bridges both behaviors (android.newDsl=false and the resvalues build feature) into every generated gradle.properties — unconditionally, since the stack is AGP 9-only under MABS 13. Both properties are removed in AGP 10, bounding the transition window. References https://outsystemsrd.atlassian.net/browse/RDMR-1420
getDefaultProguardFile('proguard-android.txt') throws at configuration
time under AGP 9, regardless of minifyEnabled. The androidx test
project builds in CI against the defaults json, so the reference must
move to proguard-android-optimize.txt before those defaults flip to 9.
References https://outsystemsrd.atlassian.net/browse/RDMR-1420
API 37 requires AGP >= 9.1, and the AGP 9.2.1 / Gradle 9.5.1 / build-tools 37.0.0 / Kotlin 2.2.20 combination matches the Capacitor 9 stack so cross-framework plugins validate against a single toolchain. These defaults govern bare projects and the framework's own builds; template preferences still override them for customer apps. References https://outsystemsrd.atlassian.net/browse/RDMR-1420
EiyuuZack
force-pushed
the
feat/RDMR-1420/agp9
branch
from
August 7, 2026 16:50
1d08582 to
9e01fe1
Compare
Gradle 8.6 stopped providing the convention for Wrapper.validateDistributionUrl (gradle/gradle#27408), which made custom Wrapper-typed tasks fail validation unless the property was set explicitly. Gradle 8.8 restored the convention (gradle/gradle#28719), the stack is now on 9.5.1, and upstream never carried the property — the workaround only matched Gradle 8.6-8.7. References https://outsystemsrd.atlassian.net/browse/RDMR-1420
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.
This moves the fork's build stack to Gradle 9.5.1 / AGP 9.2.1 / build-tools 37.0.0 / SDK 37 (Android 17) so generated apps can target API 37. AGP ≥ 9.1 is the floor for API 37 and AGP 8.x does not run on Gradle 9, so the toolchain moves in one coupled jump; the chosen versions match the Capacitor 9 stack so cross-framework plugins validate against a single toolchain. MABS 13 ships AGP 9 / Gradle 9 exclusively, so the stack carries no AGP < 9 support.
It adds 5 commits:
kotlin-androidplugin is applied.GradlePluginKotlinEnabled(including plugin.xml-injected preferences, e.g. FCM and InAppBrowser) degrades to an informational log line, and plugin Kotlin sources compile with no KGP at all.prepare—android.newDsl=falseandandroid.defaults.buildfeatures.resvalues=trueare written into every generated project, keeping legacy variant API / old DSL andresValueplugin gradle code building (the FCMgoogle-services:4.3.14chain depends on the former).test/androidxproguard reference —proguard-android.txtis a configure-time hard error under AGP 9, and that project builds in CI against the new defaults.Wrapper.validateDistributionUrlworkaround — it only matched Gradle 8.6–8.7 (broken by Avoid file generation withgradle initwhen dialog is cancelled gradle/gradle#27408, restored in 8.8 by Restore providing convention for Wrapper.validateDistributionUrl gradle/gradle#28719); upstream never carried it, so the wrapper task returns to upstream's exact form.A few consequences worth a closer look in review:
GradlePluginKotlinVersion, which no longer wires anything. This is a policy change to surface in release notes.cordova requirements androiddoes not recognize the dottedplatforms;android-37.0package (same as upstream Unable to target Android API Level 37 - requirements check fails due to37.0vs.37apache/cordova-android#1982). Builds are unaffected — the target check is only reachable through the requirements API — and the fix is tracked separately.Upstream has no AGP 9 / Gradle 9 work (master remains on Gradle 8.14.2 / AGP 8.10.1), so this takes the fork ahead of upstream. Validated with debug APK + release AAB builds from the NativeShell template at API 37 (
aapt2badging verified), hostile plugin probes (Kotlin sources dex-verified; variant-API and google-services chains exercised with and without the flags), and the fork's JS + Java test suites on the new defaults.