From 4b06b4dd51276cdf34c6873e1f4d85df59c5269f Mon Sep 17 00:00:00 2001 From: Alexander Dinauer Date: Mon, 9 Nov 2026 14:45:24 +0100 Subject: [PATCH 1/3] test(ktor): Add Ktor 3.0 compatibility suite Compile the production integration against the catalog Ktor version while compiling and running the existing tests against Ktor 3.0.0. Add the compatibility suite to check so inline API binary incompatibilities fail CI. --- sentry-ktor-client/build.gradle.kts | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/sentry-ktor-client/build.gradle.kts b/sentry-ktor-client/build.gradle.kts index a28c11eab8d..37759634036 100644 --- a/sentry-ktor-client/build.gradle.kts +++ b/sentry-ktor-client/build.gradle.kts @@ -44,6 +44,38 @@ dependencies { testImplementation(libs.okhttp.mockwebserver) } +testing { + suites { + register("testKtor300") { + useJUnit() + sources { + java.setSrcDirs(listOf("src/test/java")) + resources.setSrcDirs(listOf("src/test/resources")) + } + } + } +} + +configurations.named("testKtor300Implementation") { + extendsFrom(configurations.testImplementation.get()) +} + +listOf("testKtor300CompileClasspath", "testKtor300RuntimeClasspath").forEach { + configurations.named(it) { + resolutionStrategy.eachDependency { + if (requested.group == "io.ktor") { + useVersion("3.0.0") + } + } + } +} + +kotlin.target.compilations.named("testKtor300") { + associateWith(kotlin.target.compilations.getByName("main")) +} + +tasks.check { dependsOn(testing.suites.named("testKtor300")) } + buildConfig { useJavaOutput() packageName("io.sentry.ktorClient") From 3ef17f873ce8d5848306fac1e8efe0b89d17c914 Mon Sep 17 00:00:00 2001 From: Alexander Dinauer Date: Tue, 10 Nov 2026 11:01:58 +0100 Subject: [PATCH 2/3] test(ktor): Simplify Ktor 3.0 suite configuration Use Ktor's enforced platform to pin all compatibility test artifacts to 3.0.0 instead of maintaining a custom resolution strategy. Reuse the standard test source directories so the suite follows source changes. Co-Authored-By: Claude --- sentry-ktor-client/build.gradle.kts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/sentry-ktor-client/build.gradle.kts b/sentry-ktor-client/build.gradle.kts index 37759634036..6f3fed08452 100644 --- a/sentry-ktor-client/build.gradle.kts +++ b/sentry-ktor-client/build.gradle.kts @@ -48,8 +48,11 @@ testing { suites { register("testKtor300") { useJUnit() + dependencies { + implementation(enforcedPlatform("io.ktor:ktor-bom:3.0.0")) + } sources { - java.setSrcDirs(listOf("src/test/java")) + java.setSrcDirs(sourceSets.test.get().java.srcDirs) resources.setSrcDirs(listOf("src/test/resources")) } } @@ -60,16 +63,6 @@ configurations.named("testKtor300Implementation") { extendsFrom(configurations.testImplementation.get()) } -listOf("testKtor300CompileClasspath", "testKtor300RuntimeClasspath").forEach { - configurations.named(it) { - resolutionStrategy.eachDependency { - if (requested.group == "io.ktor") { - useVersion("3.0.0") - } - } - } -} - kotlin.target.compilations.named("testKtor300") { associateWith(kotlin.target.compilations.getByName("main")) } From c224c92bea30342355310968c0cf3cc3ef03f6c3 Mon Sep 17 00:00:00 2001 From: Alexander Dinauer Date: Wed, 11 Nov 2026 12:04:42 +0100 Subject: [PATCH 3/3] Update sentry-ktor-client/build.gradle.kts Co-authored-by: Nelson Osacky --- sentry-ktor-client/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentry-ktor-client/build.gradle.kts b/sentry-ktor-client/build.gradle.kts index 6f3fed08452..b4a5cecb05b 100644 --- a/sentry-ktor-client/build.gradle.kts +++ b/sentry-ktor-client/build.gradle.kts @@ -53,7 +53,7 @@ testing { } sources { java.setSrcDirs(sourceSets.test.get().java.srcDirs) - resources.setSrcDirs(listOf("src/test/resources")) + resources.setSrcDirs(sourceSets.test.get().resources.srcDirs) } } }