Skip to content

Commit ab66e8b

Browse files
committed
Bump Kotlin compiler to 2.3.21
Summary: Upgrade the Kotlin compiler version in the project to the latest public stable release (2.3.21). Also bump the apiVersion to KOTLIN_2_1 in all four gradle-plugin build files to resolve deprecation warnings for 2.0, and replace the deprecated -Xjvm-default compiler option in ReactAndroid with -jvm-default=no-compatibility. ## Changelog: [ANDROID] [CHANGED] - Bumped Kotlin version to 2.3.21 and Kotlin API version to 2.1 TAG=agy CONV=2fc9825d-a86b-4fbb-ab9a-e7d467b57dd3
1 parent 26790cf commit ab66e8b

7 files changed

Lines changed: 7 additions & 7 deletions

File tree

packages/gradle-plugin/gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ gson = "2.8.9"
44
guava = "31.0.1-jre"
55
javapoet = "1.13.0"
66
junit = "4.13.2"
7-
kotlin = "2.2.0"
7+
kotlin = "2.3.21"
88
assertj = "3.25.1"
99
ktfmt = "0.22.0"
1010

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

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

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

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

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

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

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

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

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

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

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

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

packages/react-native/ReactAndroid/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ android {
545545
kotlin {
546546
compilerOptions {
547547
// Using '-Xjvm-default=all' to generate default java methods for interfaces
548-
freeCompilerArgs = listOf("-Xjvm-default=all")
548+
freeCompilerArgs = listOf("-jvm-default=no-compatibility")
549549
// Using -PenableWarningsAsErrors=true prop to enable allWarningsAsErrors
550550
allWarningsAsErrors = enableWarningsAsErrors()
551551
}

packages/react-native/gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ javax-inject = "1"
2929
jsc-android = "2026004.0.1"
3030
jsr305 = "3.0.2"
3131
junit = "4.13.2"
32-
kotlin = "2.2.0"
32+
kotlin = "2.3.21"
3333
ktfmt = "0.22.0"
3434
mockito = "3.12.4"
3535
mockito-kotlin = "3.2.0"

0 commit comments

Comments
 (0)