Skip to content

feat: enable AGP v9 in BGP - #448

Merged
hurali97 merged 4 commits into
mainfrom
hur/bgp-agp-9-compliance
Sep 28, 2026
Merged

hurali97 merged 4 commits into
mainfrom
hur/bgp-agp-9-compliance

Conversation

@hurali97

Copy link
Copy Markdown
Member

Summary

This requires RN App to be v0.87.0 and Expo to be updated and released to the newer version.

Test plan

@hurali97
hurali97 force-pushed the hur/bgp-agp-9-compliance branch from 90c093a to 02802bb Compare September 28, 2026 10:26
@hurali97
hurali97 marked this pull request as ready for review September 28, 2026 10:27
Copilot AI lite review requested due to automatic review settings September 28, 2026 10:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The cacheable task does not declare all directories it writes, risking missing outputs on cache hits.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Updates the Brownfield Gradle plugin for AGP 9 and RN 0.87 compatibility.

Changes:

  • Upgrades Gradle to 9.4.1.
  • Updates AGP and Android tooling dependencies.
  • Adds caching support to MergeClassesTask.
File Summary
gradle-plugins/​react/​brownfield/​src/​main/​kotlin/​com/​callstack/​react/​brownfield/​shared/​MergeClassesTask.kt Adds task caching, but all generated destinations must be declared as outputs.
gradle-plugins/​react/​brownfield/​gradle/​wrapper/​gradle-wrapper.properties Upgrades the Gradle wrapper.
gradle-plugins/​react/​brownfield/​gradle/​libs.versions.toml Updates AGP and Android tooling versions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The AGP and Gradle upgrades require final human validation across supported RN and Expo configurations.

Review effort: Lite
Findings: None

Resolved since last review (1)

@hurali97
hurali97 merged commit ea20083 into main Sep 28, 2026
6 checks passed
@hurali97
hurali97 deleted the hur/bgp-agp-9-compliance branch September 28, 2026 12:05
KisaneNeko pushed a commit to KisaneNeko/react-native-brownfield that referenced this pull request Sep 29, 2026
With AGP compileOnly the app provides AGP at runtime, but a plugin built
against AGP 9.2.1 references AGP 9 only classes and fails on AGP 8 apps:
Expo 57 (AGP 8.12) failed with NoClassDefFoundError
com/android/build/api/dsl/AndroidLibrarySourceSet. Built against 8.5.2
(the version before callstack#448) it applies on both AGP 8.12.0 and 9.2.1.
hurali97 added a commit that referenced this pull request Oct 1, 2026
* fix(bgp): don't force the plugin's AGP version onto consuming apps

The plugin declared AGP as an `implementation` dependency, so it ended up
on the app's buildscript classpath and won version resolution. Since #448
bumped it to AGP 9.2.1, every consumer gets AGP 9.2.1 and its minimum
Gradle 9.4.1, which breaks Expo SDK 57 apps (Gradle 9.3.1):
"Minimum supported Gradle version is 9.4.1. Current version is 9.3.1."

Compile against AGP but let the app provide it at runtime.

Also drop the leftover version matrix from the Expo 57 Android build job,
which ran the same Expo 57 build twice.

* test(bgp): put AGP on the TestKit plugin classpath

GradleRunner.withPluginClasspath() is built from the runtime classpath,
which no longer has AGP now that it is compileOnly, so
LegacyConsumerConfigurationTest could not apply com.android.library.

* test(e2e): rename AndroidApp Jest config for Expo 58

#467 renamed the Expo 56 app and AppleApp's jest.config.expo56.cjs to
expo58, but not AndroidApp's, so .detoxrc.expo58.cjs points at a file that
doesn't exist and Detox E2E (AndroidApp - Expo 58) fails with "Can't find
a root directory while resolving a config file path".

* fix(bgp): compile against AGP 8.5.2

With AGP compileOnly the app provides AGP at runtime, but a plugin built
against AGP 9.2.1 references AGP 9 only classes and fails on AGP 8 apps:
Expo 57 (AGP 8.12) failed with NoClassDefFoundError
com/android/build/api/dsl/AndroidLibrarySourceSet. Built against 8.5.2
(the version before #448) it applies on both AGP 8.12.0 and 9.2.1.

* fix: make agp compileOnly with test matrix

---------

Co-authored-by: Radoslaw Nowacki <radoslaw.nowacki@callastack.com>
Co-authored-by: Hur Ali <hurali97@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants