From 509e11d6504bacc9296de2d4d052cfc5d0df1dfb Mon Sep 17 00:00:00 2001 From: Jesse Wilson Date: Wed, 2 Jul 2025 13:36:56 -0400 Subject: [PATCH] Sentry too --- .../build.gradle.kts | 10 +++++++ .../DependsOnSentryAndLatestTest.kt | 28 +++++++++++++++++++ .../okhttp4-and-latest/settings.gradle.kts | 1 + 3 files changed, 39 insertions(+) create mode 100644 artifact-tests/okhttp4-and-latest/lib-depends-on-sentry-and-latest/build.gradle.kts create mode 100644 artifact-tests/okhttp4-and-latest/lib-depends-on-sentry-and-latest/src/test/kotlin/artifacttests/DependsOnSentryAndLatestTest.kt diff --git a/artifact-tests/okhttp4-and-latest/lib-depends-on-sentry-and-latest/build.gradle.kts b/artifact-tests/okhttp4-and-latest/lib-depends-on-sentry-and-latest/build.gradle.kts new file mode 100644 index 000000000..dd14c114d --- /dev/null +++ b/artifact-tests/okhttp4-and-latest/lib-depends-on-sentry-and-latest/build.gradle.kts @@ -0,0 +1,10 @@ +plugins { + alias(libs.plugins.kotlin.jvm) +} + +dependencies { + implementation("io.sentry:sentry-okhttp:8.16.0") + implementation(project(":lib-depends-on-latest")) + testImplementation(libs.assertk) + testImplementation(project(":classpathscanner")) +} diff --git a/artifact-tests/okhttp4-and-latest/lib-depends-on-sentry-and-latest/src/test/kotlin/artifacttests/DependsOnSentryAndLatestTest.kt b/artifact-tests/okhttp4-and-latest/lib-depends-on-sentry-and-latest/src/test/kotlin/artifacttests/DependsOnSentryAndLatestTest.kt new file mode 100644 index 000000000..f92937d19 --- /dev/null +++ b/artifact-tests/okhttp4-and-latest/lib-depends-on-sentry-and-latest/src/test/kotlin/artifacttests/DependsOnSentryAndLatestTest.kt @@ -0,0 +1,28 @@ +package artifacttests + +import assertk.assertThat +import assertk.assertions.contains +import assertk.assertions.exactly +import kotlin.test.Test + +class DependsOnSentryAndLatestTest { + @Test + fun exactlyOneOkHttpJvmDependency() { + assertThat(ClasspathScanner.roots) + .exactly(1) { assert -> + assert + .transform { path -> path.toString() } + .contains("/com.squareup.okhttp3/okhttp-jvm/") + } + } + + @Test + fun noOkHttp4Dependency() { + assertThat(ClasspathScanner.roots) + .exactly(0) { assert -> + assert + .transform { path -> path.toString() } + .contains("/com.squareup.okhttp3/okhttp/") + } + } +} diff --git a/artifact-tests/okhttp4-and-latest/settings.gradle.kts b/artifact-tests/okhttp4-and-latest/settings.gradle.kts index 12fd16853..f1ebc6e2a 100644 --- a/artifact-tests/okhttp4-and-latest/settings.gradle.kts +++ b/artifact-tests/okhttp4-and-latest/settings.gradle.kts @@ -30,5 +30,6 @@ include("lib-depends-on-ld-and-latest") include("lib-depends-on-latest") include("lib-depends-on-latest-jvm") include("lib-depends-on-retrofit-and-latest") +include("lib-depends-on-sentry-and-latest") include("lib-depends-on-wire-and-latest")