Repository navigation
chore(android): AGP 8.9 + Gradle 8.11 ahead of the API 36 bump (ENG-605) - #733
Merged
Merged
Conversation
PR1 of the ENG-605 sequence: move the Android toolchain forward so the compileSdk/targetSdk 36 bump (PR2+) lands on a supported plugin. SDK levels are unchanged in this PR (compileSdk/targetSdk stay 35, minSdk 26, Kotlin 2.0.21, NDK 27.1.12297006). - Android Gradle Plugin 8.7.2 -> 8.9.3 (latest 8.9.x) - Gradle wrapper 8.10.2 -> 8.11.1 (AGP 8.9 minimum), with the distribution sha256 pinned - drop the explicit com.android.tools:r8 classpath pin and the r8-releases maven repo: the pin was introduced with breez-sdk-liquid (#248) and kept in lockstep with the AGP-bundled R8 (#622 bumped it to 8.7.18 = AGP 8.7.2's own), so it was a no-op; AGP 8.9.3 resolves its bundled R8 on its own - drop android.aapt2Version=8.6.1-11315950 (gradle.properties and the .example): added in #441 for the targetSdk 35 bump with no recorded reason, and android-deploy.yml already builds release without it - android/app/build.gradle: make the app's configureCMake* tasks depend on every library's generateCodegenArtifactsFromSchema. AGP 8.8+ no longer routes configureCMake through each library's preBuild, so codegen-only autolinked libs (react-native-config, async-storage, clipboard, netinfo, ...) had no codegen/jni dir yet when the app's CMake configure ran and RN 0.77's Android-autolinking.cmake failed with "add_subdirectory given source ... not an existing directory". Verified: same tree builds on AGP 8.7.2, fails on 8.9.3 without this edge, builds on 8.9.3 with it. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This was referenced Sep 24, 2026
islandbitcoin
added a commit
that referenced
this pull request
Sep 24, 2026
ENG-605 PR3. Stacked on #733 (AGP 8.9.3 / Gradle 8.11.1) and #735 (every native dependency now inherits rootProject.ext), so this is the two-line bump those prepared for: - compileSdkVersion 35 -> 36 - buildToolsVersion 35.0.0 -> 36.0.0 targetSdkVersion stays at 35 (PR5), minSdkVersion unchanged, so there is no runtime behaviour change: the app is compiled against the API 36 headers but Android still applies API 35 compatibility behaviour. AGP 8.9.3 supports compileSdk 36 natively; no android.suppressUnsupportedCompileSdk entry was needed in gradle.properties. CI is unchanged: both Android workflows install only platform-tools and let Gradle fetch the pinned platform/build-tools. Verified locally (platforms;android-36 + build-tools;36.0.0): assembleRelease and assembleDebug (arm64-v8a) BUILD SUCCESSFUL, all 8 libraries that print a compileSdk report "using custom value: 36"; yarn tsc:check clean; yarn test 1161 passed. Co-authored-by: Dread <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
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.
PR1 of the ENG-605 sequence: move the Android toolchain forward so the API 36 bump lands on a supported plugin. SDK levels unchanged; PR2 bumps the libs that hardcode compileSdk < 36.
What changed
distributionSha256Sumnow pinnedcom.android.tools:r8classpath pin +r8-releasesmaven repoandroid.aapt2Version=8.6.1-11315950(gradle.properties+.example)Why drop the R8 pin: introduced with breez-sdk-liquid (#248) and bumped in #622 to 8.7.18, i.e. exactly what AGP 8.7.2 bundles, so it was already a no-op. No comment recorded a reason. Note release builds have
enableProguardInReleaseBuilds = false, so R8 shrinking is off anyway; only D8 dexing runs.Why drop the aapt2 pin: added in #441 (targetSdk 35 bump) with no recorded reason, and
android-deploy.ymlalready generates agradle.propertieswithout it for every release build.android/app/build.gradle(required companion change): AGP 8.8+ no longer routes the app'sconfigureCMake*tasks through every library'spreBuild. Autolinked libraries that ship codegen specs but no native code (react-native-config, async-storage, clipboard, netinfo, ...) therefore have nobuild/generated/source/codegen/jni/yet when the app's CMake configure runs, and RN 0.77's generatedAndroid-autolinking.cmakeadd_subdirectory()s those dirs unconditionally:Fix: the app's
configureCMake*tasks now depend on every library'sgenerateCodegenArtifactsFromSchema. Verified on the same tree: builds on AGP 8.7.2, fails on 8.9.3 without the edge, builds on 8.9.3 with it. (Upstream RN only guards the missing dirs, react/react-native#56886, which would silently drop those TurboModules from a real build; the ordering edge is the actual fix.)Why now
AGP 8.9 is the floor for compileSdk 36 work (PR2). Doing the plugin/wrapper move in its own PR keeps the SDK bump diff reviewable and makes any build regression attributable.
Build proof (local, macOS arm64, JDK 17.0.19, Node 24)
Result:
BUILD SUCCESSFUL in 4m 40s, 2223 tasks.android/app/build/outputs/apk/release/app-arm64-v8a-release.apk= 105,062,656 bytes (debug-keystore signed; the trackedgradle.propertiespoints at a release keystore not present locally, hence the-Poverrides).yarn tsc:checkclean. Generated bundle +drawable-*assets were not committed.Warnings seen (AGP 8.9.3 / Gradle 8.11.1,
--warning-mode all)RepositoryHandler.jcenter()deprecated, removed in Gradle 9.0 (6x, from third-party librarybuild.gradles, not ours).buildToolsVersion '31.0.0'/'33.0.0'ignored, below AGP 8.9's minimum 35.0.0 (two libraries; harmless, worth cleaning in PR2).react-native-webview,Some input files use or override a deprecated API(javac) - library code, unchanged by this PR.Specifying custom build file location (-b)deprecated for Gradle 9.0 - from the local invocation style only; CI runscd android && ./gradlew ....No AGP 9.0 removal warnings originate from this repo's own Gradle files.
CI
build-check.ymlandandroid-deploy.ymlusesetup-java@v4(17) +android-actions/setup-android@v3+ the wrapper; neither pins a Gradle or AGP version, so nothing needs to change.build-check.ymlcopiesgradle.properties.example, which is updated here too.🤖 Generated with Claude Code