Skip to content

chore(deps): migrate example Android to Gradle wrapper 9.9.2 - #43

Merged
lam0819 merged 1 commit into
mainfrom
fix/gradle-9.9.2
Nov 26, 2026
Merged

lam0819 merged 1 commit into
mainfrom
fix/gradle-9.9.2

Conversation

@lam0819

@lam0819 lam0819 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Supersedes #29, the Dependabot Gradle wrapper bump. This PR is rebased on main (RN 0.88.1, Gradle 9.4.1) and takes the wrapper from 9.4.1 to 9.9.2.

Why #29 fails

Gradle 9.9 embeds Kotlin 2.4.21. The included build @react-native/gradle-plugin@0.88.1 compiles against gradleApi() with Kotlin 2.2.0, which can only read metadata up to 2.3. The build fails with:

Incompatible classes were found in dependencies

Fix

A yarn patch on @react-native/gradle-plugin@npm:0.88.1, wired in through resolutions:

  • The kotlin-jvm plugin, which compiles the plugin's own build logic, moves to 2.4.21 through a new kotlin-compiler catalog entry.
  • The plugin's kotlin-gradle-plugin dependency stays at 2.2.0, so the example app and the library still resolve KGP 2.2.10.

Remove the patch when an RN release ships a gradle plugin built with Kotlin 2.3 or later.

Verified locally (JDK 17, Gradle 9.9.2)

  • yarn example test:android → BUILD SUCCESSFUL
  • yarn example build:android → BUILD SUCCESSFUL

Bump the example Gradle wrapper from 9.4.1 to 9.9.2 (from Dependabot #29).

Gradle 9.9 embeds Kotlin 2.4.21. The @react-native/gradle-plugin 0.88.1
included build compiles against gradleApi() with Kotlin 2.2.0, which
cannot read 2.4 metadata ("Incompatible classes were found in
dependencies"). Yarn-patch the plugin so its build logic is compiled
with the Kotlin 2.4.21 JVM plugin, while keeping its
kotlin-gradle-plugin dependency at 2.2.0 so the app and library still
resolve KGP 2.2.10.

Supersedes #29.
@lam0819
lam0819 merged commit 73f8724 into main Nov 26, 2026
8 checks passed
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.

1 participant