ci: compile a React Native 0.87 app on AGP 9 with and without built-in Kotlin - #1940
Open
AlvaroBrey wants to merge 3 commits into
Open
ci: compile a React Native 0.87 app on AGP 9 with and without built-in Kotlin#1940AlvaroBrey wants to merge 3 commits into
AlvaroBrey wants to merge 3 commits into
Conversation
AlvaroBrey
force-pushed
the
agp9-smoke-test
branch
from
September 3, 2026 14:51
05887e3 to
57332d0
Compare
AlvaroBrey
marked this pull request as ready for review
September 3, 2026 14:53
AlvaroBrey
marked this pull request as draft
September 3, 2026 14:54
AlvaroBrey
force-pushed
the
agp9-smoke-test
branch
from
September 3, 2026 15:04
57332d0 to
d52419d
Compare
Generated by 🚫 Danger |
AlvaroBrey
force-pushed
the
agp9-smoke-test
branch
from
September 3, 2026 15:18
d52419d to
71625ff
Compare
AlvaroBrey
marked this pull request as ready for review
September 3, 2026 15:38
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.
e2e-tests/AGP9TestApp, the Android project of a stock React Native0.87.1app that autolinksreact-native-purchasesandreact-native-purchases-uifrom the repo. RN 0.87 is the first release whose Gradle plugin pins AGP 9.agp9_test_app_androidCircleCI job runs:app:compileDebugKotlintwice: once with the template'sgradle.properties(android.builtInKotlin=false,android.newDsl=false), once with both flags on, which is what AGP 10 forces.kotlin-androidguard from [EXTERNAL] fix(android): skip explicit Kotlin plugin when AGP registers the kotlin extension #1934 in a real app: configuration, autolinking, and compiling the modules' Kotlin under KGP 2.2 and under AGP's built-in Kotlin.holdwaits on the new job.package.jsoncarries onlyreact-nativeand the CLI packages autolinking needs, and the job stops at Kotlin compilation, so no NDK, dexing or packaging.Checklist
Agent description
Motivation
#1934 made both Android modules configure under AGP 9, verified by hand on an Expo SDK 58 / RN 0.87 app. Nothing in CI runs AGP 9: every job builds an example app, and the RN Gradle plugin picks AGP from the RN version (0.78 pins 8.8, 0.86 pins 8.12, 0.87 pins 9.2.1). All apps in the repo are on 0.78 to 0.86.
Description
AGP9TestAppisnpx @react-native-community/cli init --version 0.87.1with everything the Gradle build does not read removed: iOS, the JS entry point and Metro/Babel/TS config, Jest, ESLint, Prettier, launcher icons, release signing. Standalone package with its ownyarn.lock, likeexamples/adsTester, since the root workspace is on RN 0.78.react-native.config.jspoints autolinking at the two module roots, the same waye2e-tests/MaestroTestAppdoes. Nothing is published or symlinked.gradle.propertieskeeps the template'sandroid.builtInKotlin=false/android.newDsl=false; the second CI build overrides both with-P.reactNativeArchitectures=x86_64to keep the NDK build short.app/build.gradlehardcodesapply plugin: "org.jetbrains.kotlin.android"and fails with the flags on before reaching our modules, so it gets the samefindByName('kotlin')guard. That is the one edit to the generated Android project besidesgradle.properties.Regression gates
android/build.gradleto an unconditionalapply plugin: 'kotlin-android'fails the flags-on run at configuration withCannot add extension with name 'kotlin', the error from [EXTERNAL] fix(android): skip explicit Kotlin plugin when AGP registers the kotlin extension #1934.Rejected:
MaestroTestAppto RN 0.87: it is the app the Maestro E2E suite runs on, and coupling the two makes both harder to change.Limitations:
compileSdkVersion,targetSdkVersion,versionCodeandlintOptionsin both modules are deprecated on AGP 9 and removed in AGP 10. AGP 9 still accepts them under the new DSL, so this passes today and will start failing when the app moves to an RN release that pins AGP 10.android/build.gradlealso has nonamespace; the RN Gradle plugin fills it in from the manifestpackage. Both are follow-ups.Note
Low Risk
Changes are limited to a new e2e fixture and CircleCI wiring; published SDK behavior is unchanged.
Overview
Adds AGP9TestApp, a minimal React Native 0.87 Android project (no JS) that autolinks
react-native-purchasesandreact-native-purchases-uifrom the monorepo—the first RN version that pins AGP 9. The app’sbuild.gradleapplies the Kotlin Android plugin only when AGP has not already registered Kotlin, matching the guard from #1934.CircleCI gains
agp9_test_app_android, which runs:app:compileDebugKotlintwice: once with the stock template flags (android.builtInKotlin=false,android.newDsl=false) and once with built-in Kotlin and the new DSL enabled via-P, so CI covers both KGP and Expo-style AGP 9 setups. The job is on the default test workflow and is required by the releaseholdgate alongside core analyse/android/ios checks.Reviewed by Cursor Bugbot for commit 24f5d1a. Bugbot is set up for automated code reviews on this repo. Configure here.