From c30a83e6052c2440e9a0f5cc4b44b7fece8dd514 Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Mon, 22 Jun 2026 14:41:41 +0200 Subject: [PATCH 1/2] ref(android): Remove kotlinStdLibVersionAndroid pin The Android modules pinned the Kotlin stdlib to 1.9.24 via Config.kotlinStdLibVersionAndroid, overriding the version managed by the Kotlin Gradle plugin (2.2.0). Drop the explicit version so the stdlib aligns with the plugin automatically. Co-Authored-By: Claude Opus 4.8 --- buildSrc/src/main/java/Config.kt | 1 - sentry-android-distribution/build.gradle.kts | 2 +- sentry-android-replay/build.gradle.kts | 2 +- sentry-android-sqlite/build.gradle.kts | 2 +- sentry-android-timber/build.gradle.kts | 2 +- sentry-ktor-client/build.gradle.kts | 2 +- sentry-launchdarkly-android/build.gradle.kts | 2 +- sentry-okhttp/build.gradle.kts | 2 +- 8 files changed, 7 insertions(+), 8 deletions(-) diff --git a/buildSrc/src/main/java/Config.kt b/buildSrc/src/main/java/Config.kt index f0e2e9baf86..7eb84f9989c 100644 --- a/buildSrc/src/main/java/Config.kt +++ b/buildSrc/src/main/java/Config.kt @@ -2,7 +2,6 @@ object Config { val AGP = System.getenv("VERSION_AGP") ?: "8.13.1" val kotlinStdLib = "stdlib-jdk8" - val kotlinStdLibVersionAndroid = "1.9.24" val kotlinTestJunit = "test-junit" object BuildPlugins { diff --git a/sentry-android-distribution/build.gradle.kts b/sentry-android-distribution/build.gradle.kts index 2d23bf3ab74..4723bd1007c 100644 --- a/sentry-android-distribution/build.gradle.kts +++ b/sentry-android-distribution/build.gradle.kts @@ -35,7 +35,7 @@ dependencies { implementation( libs.jetbrains.annotations ) // Use implementation instead of compileOnly to override kotlin stdlib's version - implementation(kotlin(Config.kotlinStdLib, Config.kotlinStdLibVersionAndroid)) + implementation(kotlin(Config.kotlinStdLib)) testImplementation(libs.androidx.test.ext.junit) testImplementation(libs.roboelectric) testImplementation(libs.kotlin.test.junit) diff --git a/sentry-android-replay/build.gradle.kts b/sentry-android-replay/build.gradle.kts index 8d0f63797aa..6bfcffbef5a 100644 --- a/sentry-android-replay/build.gradle.kts +++ b/sentry-android-replay/build.gradle.kts @@ -70,7 +70,7 @@ dependencies { api(projects.sentry) compileOnly(libs.androidx.compose.ui.replay) - implementation(kotlin(Config.kotlinStdLib, Config.kotlinStdLibVersionAndroid)) + implementation(kotlin(Config.kotlinStdLib)) // tests testImplementation(projects.sentryTestSupport) testImplementation(projects.sentryAndroidCore) diff --git a/sentry-android-sqlite/build.gradle.kts b/sentry-android-sqlite/build.gradle.kts index 6e0275b29b8..c1b8d8ae7b5 100644 --- a/sentry-android-sqlite/build.gradle.kts +++ b/sentry-android-sqlite/build.gradle.kts @@ -71,7 +71,7 @@ dependencies { compileOnly(libs.androidx.sqlite) compileOnly(libs.jetbrains.annotations) - implementation(kotlin(Config.kotlinStdLib, Config.kotlinStdLibVersionAndroid)) + implementation(kotlin(Config.kotlinStdLib)) // tests testImplementation(libs.androidx.sqlite) diff --git a/sentry-android-timber/build.gradle.kts b/sentry-android-timber/build.gradle.kts index d8f8431bef1..f50c5862943 100644 --- a/sentry-android-timber/build.gradle.kts +++ b/sentry-android-timber/build.gradle.kts @@ -66,7 +66,7 @@ dependencies { compileOnly(libs.timber) - implementation(kotlin(Config.kotlinStdLib, Config.kotlinStdLibVersionAndroid)) + implementation(kotlin(Config.kotlinStdLib)) // tests testImplementation(libs.timber) diff --git a/sentry-ktor-client/build.gradle.kts b/sentry-ktor-client/build.gradle.kts index 745acaa11fb..cc50ee547b8 100644 --- a/sentry-ktor-client/build.gradle.kts +++ b/sentry-ktor-client/build.gradle.kts @@ -22,7 +22,7 @@ kotlin { explicitApi() } dependencies { api(projects.sentry) - implementation(kotlin(Config.kotlinStdLib, Config.kotlinStdLibVersionAndroid)) + implementation(kotlin(Config.kotlinStdLib)) api(projects.sentryKotlinExtensions) compileOnly(libs.jetbrains.annotations) diff --git a/sentry-launchdarkly-android/build.gradle.kts b/sentry-launchdarkly-android/build.gradle.kts index 427ec473676..0739648af39 100644 --- a/sentry-launchdarkly-android/build.gradle.kts +++ b/sentry-launchdarkly-android/build.gradle.kts @@ -61,7 +61,7 @@ dependencies { // tests testImplementation(projects.sentry) testImplementation(projects.sentryTestSupport) - testImplementation(kotlin(Config.kotlinStdLib, Config.kotlinStdLibVersionAndroid)) + testImplementation(kotlin(Config.kotlinStdLib)) testImplementation(libs.androidx.test.ext.junit) testImplementation(libs.kotlin.test.junit) testImplementation(libs.mockito.kotlin) diff --git a/sentry-okhttp/build.gradle.kts b/sentry-okhttp/build.gradle.kts index ea831f174cc..534814943e0 100644 --- a/sentry-okhttp/build.gradle.kts +++ b/sentry-okhttp/build.gradle.kts @@ -22,7 +22,7 @@ kotlin { explicitApi() } dependencies { api(projects.sentry) - implementation(kotlin(Config.kotlinStdLib, Config.kotlinStdLibVersionAndroid)) + implementation(kotlin(Config.kotlinStdLib)) compileOnly(libs.jetbrains.annotations) compileOnly(libs.nopen.annotations) From 955c952c4360030127a8fb3b2213df6e15583f04 Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Mon, 22 Jun 2026 14:42:36 +0200 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d66d755a7c..6424d18e621 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - Release `MediaMuxer` when a replay segment has no encodable frames to avoid a resource leak ([#5583](https://github.com/getsentry/sentry-java/pull/5583)) +### Dependencies + +- Align the Kotlin stdlib version in Android modules with the Kotlin Gradle plugin instead of pinning it to 1.9.24 ([#5590](https://github.com/getsentry/sentry-java/pull/5590)) + ## 8.44.1 ### Fixes