[Android] Bump Kotlin to 2.4.21 (#59888)

This commit is contained in:
Nicola Corti authored and GitHub committed 2026-11-13 13:51:52 +00:00
1 parent 85a285a4bb
commit 751ba61c19
10 files changed
+11 -9

No files matched your search

@@ -4,7 +4,7 @@ gson = "2.8.9"
guava = "31.0.1-jre"
javapoet = "1.13.0"
junit = "4.13.2"
kotlin = "2.3.21"
kotlin = "2.4.21"
assertj = "3.25.1"
[libraries]
@@ -64,6 +64,8 @@ kotlin { jvmToolchain(17) }
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
apiVersion.set(KotlinVersion.KOTLIN_2_1)
// Remove this suppression in RN 0.90 when the Kotlin API version can be raised.
freeCompilerArgs.add("-Xwarning-level=DEPRECATED_LANGUAGE_VERSION:disabled")
// See comment above on JDK 11 support
jvmTarget.set(JvmTarget.JVM_11)
allWarningsAsErrors.set(
@@ -54,6 +54,8 @@ kotlin { jvmToolchain(17) }
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
apiVersion.set(KotlinVersion.KOTLIN_2_1)
// Remove this suppression in RN 0.90 when the Kotlin API version can be raised.
freeCompilerArgs.add("-Xwarning-level=DEPRECATED_LANGUAGE_VERSION:disabled")
// See comment above on JDK 11 support
jvmTarget.set(JvmTarget.JVM_11)
allWarningsAsErrors.set(
@@ -25,6 +25,8 @@ kotlin { jvmToolchain(17) }
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
apiVersion.set(KotlinVersion.KOTLIN_2_1)
// Remove this suppression in RN 0.90 when the Kotlin API version can be raised.
freeCompilerArgs.add("-Xwarning-level=DEPRECATED_LANGUAGE_VERSION:disabled")
// See comment above on JDK 11 support
jvmTarget.set(JvmTarget.JVM_11)
allWarningsAsErrors.set(
@@ -31,6 +31,8 @@ kotlin { jvmToolchain(17) }
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
apiVersion.set(KotlinVersion.KOTLIN_2_1)
// Remove this suppression in RN 0.90 when the Kotlin API version can be raised.
freeCompilerArgs.add("-Xwarning-level=DEPRECATED_LANGUAGE_VERSION:disabled")
// See comment above on JDK 11 support
jvmTarget.set(JvmTarget.JVM_11)
allWarningsAsErrors.set(
@@ -28,13 +28,11 @@ import org.mockito.kotlin.verify
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
import org.robolectric.annotation.GraphicsMode
import org.robolectric.annotation.TextLayoutMode
@RequiresApi(Build.VERSION_CODES.Q)
@RunWith(RobolectricTestRunner::class)
@Config(sdk = [Build.VERSION_CODES.UPSIDE_DOWN_CAKE, Build.VERSION_CODES.VANILLA_ICE_CREAM])
@GraphicsMode(GraphicsMode.Mode.NATIVE)
@TextLayoutMode(TextLayoutMode.Mode.REALISTIC)
class TextDecorationStyleTest {
@Test
fun fromStringSolid() {
@@ -26,11 +26,9 @@ import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.RuntimeEnvironment
import org.robolectric.annotation.GraphicsMode
import org.robolectric.annotation.TextLayoutMode
@RunWith(RobolectricTestRunner::class)
@GraphicsMode(GraphicsMode.Mode.NATIVE)
@TextLayoutMode(TextLayoutMode.Mode.REALISTIC)
@SuppressLint("InlinedApi")
class TextLayoutManagerFontSizeToFitPixelHeightTest {
@@ -20,11 +20,9 @@ import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.GraphicsMode
import org.robolectric.annotation.TextLayoutMode
@RunWith(RobolectricTestRunner::class)
@GraphicsMode(GraphicsMode.Mode.NATIVE)
@TextLayoutMode(TextLayoutMode.Mode.REALISTIC)
class TextLayoutManagerPixelWidthTest {
private val text = SpannableString("Add payment method")
private val paint = TextPaint(TextPaint.ANTI_ALIAS_FLAG).apply { textSize = 16f }
@@ -31,7 +31,7 @@ javax-inject = "1"
jsc-android = "2026004.0.1"
jsr305 = "3.0.2"
junit = "4.13.2"
kotlin = "2.3.21"
kotlin = "2.4.21"
mockito = "3.12.4"
mockito-kotlin = "3.2.0"
nexus-publish = "2.0.0"
+1 -1
View File
@@ -12,7 +12,7 @@ buildscript {
compileSdkVersion = 37
targetSdkVersion = 35
ndkVersion = "28.2.13676358"
kotlinVersion = "2.3.21"
kotlinVersion = "2.4.21"
}
repositories {
google()