Skip to content

Commit c8e31ae

Browse files
authored
build: upgrade Kotlin to 2.4.0 and R8 to 9.1.31 (#160)
PR: #161
1 parent b16a0d5 commit c8e31ae

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

build.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ allprojects {
142142

143143
dependencies {
144144
add("compileOnly", libs.slf4j.api)
145+
// Modern nullability annotations on the compile classpath. kotlin-stdlib pins the ancient
146+
// org.jetbrains:annotations:13.0 transitively, which lacks @UnknownNullability; Kotlin 2.4.0
147+
// tooling materialises inferred platform types with that annotation and reports it as
148+
// inaccessible against 13.0. compileOnly keeps it out of the published POM and ABI.
149+
add("compileOnly", libs.jetbrains.annotations)
145150
}
146151
}
147152

gradle/libs.versions.toml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
[versions]
2-
kotlin = "2.3.21"
2+
kotlin = "2.4.0"
33
kotlinx-coroutines = "1.11.0"
44
slf4j = "2.0.18"
5+
# Compile-only nullability annotations (@NotNull/@Nullable/@UnknownNullability). kotlin-stdlib drags
6+
# in the ancient 13.0 transitively, which predates UnknownNullability; Kotlin 2.4.0 tooling materialises
7+
# inferred platform types with that annotation, so a modern version must be on the compile classpath.
8+
jetbrains-annotations = "26.0.2"
59
okio = "3.17.0"
610
okhttp = "5.0.0"
711
mockwebserver = "5.0.0"
@@ -10,15 +14,17 @@ netty = "4.2.13.Final"
1014
jackson = "2.18.2"
1115
junit-jupiter = "5.10.2"
1216
# R8 is used only by the test-only sdk-shrink-test module to verify the SDK survives consumer-side
13-
# shrinking. It is fetched from Google's Maven repo and never enters a published artifact.
14-
r8 = "8.9.35"
17+
# shrinking. It is fetched from Google's Maven repo and never enters a published artifact. Kept current
18+
# with the Kotlin bump so R8 can parse the metadata version emitted by the Kotlin compiler.
19+
r8 = "9.1.31"
1520
kover = "0.9.8"
1621
binary-compatibility-validator = "0.16.3"
1722
ktlint-plugin = "12.1.1"
1823
detekt = "1.23.6"
1924

2025
[libraries]
2126
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
27+
jetbrains-annotations = { module = "org.jetbrains:annotations", version.ref = "jetbrains-annotations" }
2228
slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
2329
slf4j-nop = { module = "org.slf4j:slf4j-nop", version.ref = "slf4j" }
2430
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }

0 commit comments

Comments
 (0)