Skip to content

Bump Gradle to 9.4 (Kotlin to 2.3, AGP to 9.1)#56222

Draft
leotm wants to merge 3 commits intofacebook:mainfrom
leotm:gradle-9.4
Draft

Bump Gradle to 9.4 (Kotlin to 2.3, AGP to 9.1)#56222
leotm wants to merge 3 commits intofacebook:mainfrom
leotm:gradle-9.4

Conversation

@leotm
Copy link
Contributor

@leotm leotm commented Mar 25, 2026

Summary:

Follow-up to

  • bump Gradle wrapper from 9.3.1 to 9.4.0 (root, RNGP, helloworld)
  • bump RNGP: AGP from 8.12.0 to 9.1.0, Kotlin from 2.1.20 to 2.3.0
  • bump RNGP Kotlin compiler API ver from KOTLIN_1_8 to KOTLIN_2_3

Then follow-up react-native-community/template gradlew and kotlinVersion updates

Changelog:

[ANDROID] [CHANGED] - Gradle to 9.4.0, Kotlin 2.3.0, AGP 9.1.0

Test Plan:

Follow-up to facebook#55453

- bump Gradle wrapper from 9.3.1 to 9.4.0 (root, RNGP, helloworld)
- bump RNGP: AGP from 8.12.0 to 9.1.0, Kotlin from 2.1.20 to 2.3.0
- bump RNGP Kotlin compiler API ver from KOTLIN_1_8 to KOTLIN_2_3

Then follow-up react-native-community/template gradlew and kotlinVersion updates

Ref: leotm/react-native-template-new-architecture#1933
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 25, 2026
leotm added 2 commits March 25, 2026 22:50
- ReactPlugin.kt: Replace deprecated srcDir() with directories.add()
- AgpConfiguratorUtils.kt: Remove deprecated LibraryExtension import, use libraryVariants API
- NdkConfiguratorUtils.kt: Remove prefab buildFeatures (removed in AGP 9.0+)

Fixes: build_android (Kotlin -Werror), build_fantom_runner (AGP 9.1 API)
- ReactPlugin.kt: Use .asFile to convert Directory to File for directories.add()
- AgpConfiguratorUtils.kt: Remove deprecated libraryVariants API, directly access manifest file

These changes address AGP 9.1 API changes where libraryVariants was removed
and Directory types need to be converted to File for source set configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant