Skip to content

Commit e09adcc

Browse files
Abbondanzofacebook-github-bot
authored andcommitted
Bump Gradle plugin Kotlin API version from 2.0 to 2.1
Summary: Kotlin 2.3 deprecated API version 2.0, so compiling the Gradle plugin modules with warnings as errors fails with "API version 2.0 is deprecated" in `:gradle-plugin:shared:compileKotlin`. Bump `apiVersion` to `KOTLIN_2_1` in all four gradle-plugin build files, matching how the previous Kotlin upgrade moved it from 1.9 to 2.0. Gradle 9, which React Native requires, embeds a Kotlin 2.2 runtime, so the plugin stays loadable on every supported Gradle version. Changelog: [Android][Changed] - Bumped the Gradle plugin's minimum Kotlin API version to 2.1 Differential Revision: D127831836
1 parent f754dbd commit e09adcc

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎packages/gradle-plugin/react-native-gradle-plugin/build.gradle.kts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ kotlin { jvmToolchain(17) }
6363

6464
tasks.withType<KotlinCompile>().configureEach {
6565
compilerOptions {
66-
apiVersion.set(KotlinVersion.KOTLIN_2_0)
66+
apiVersion.set(KotlinVersion.KOTLIN_2_1)
6767
// See comment above on JDK 11 support
6868
jvmTarget.set(JvmTarget.JVM_11)
6969
allWarningsAsErrors.set(

‎packages/gradle-plugin/settings-plugin/build.gradle.kts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ kotlin { jvmToolchain(17) }
5353

5454
tasks.withType<KotlinCompile>().configureEach {
5555
compilerOptions {
56-
apiVersion.set(KotlinVersion.KOTLIN_2_0)
56+
apiVersion.set(KotlinVersion.KOTLIN_2_1)
5757
// See comment above on JDK 11 support
5858
jvmTarget.set(JvmTarget.JVM_11)
5959
allWarningsAsErrors.set(

‎packages/gradle-plugin/shared-testutil/build.gradle.kts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ kotlin { jvmToolchain(17) }
2424

2525
tasks.withType<KotlinCompile>().configureEach {
2626
compilerOptions {
27-
apiVersion.set(KotlinVersion.KOTLIN_2_0)
27+
apiVersion.set(KotlinVersion.KOTLIN_2_1)
2828
// See comment above on JDK 11 support
2929
jvmTarget.set(JvmTarget.JVM_11)
3030
allWarningsAsErrors.set(

‎packages/gradle-plugin/shared/build.gradle.kts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ kotlin { jvmToolchain(17) }
3030

3131
tasks.withType<KotlinCompile>().configureEach {
3232
compilerOptions {
33-
apiVersion.set(KotlinVersion.KOTLIN_2_0)
33+
apiVersion.set(KotlinVersion.KOTLIN_2_1)
3434
// See comment above on JDK 11 support
3535
jvmTarget.set(JvmTarget.JVM_11)
3636
allWarningsAsErrors.set(

0 commit comments

Comments
 (0)