diff --git a/CHANGELOG.md b/CHANGELOG.md index 3933632f7b..8269af4045 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Fixes + +- Change Spring Boot, Apollo, Apollo 3, JUL, Logback, Log4j2, OpenFeign, GraphQL and Kotlin coroutines core dependencies to compileOnly ([#2837](https://github.com/getsentry/sentry-java/pull/2837)) + ## 6.25.1 ### Fixes diff --git a/sentry-apollo-3/build.gradle.kts b/sentry-apollo-3/build.gradle.kts index 46aa7df472..22583203ed 100644 --- a/sentry-apollo-3/build.gradle.kts +++ b/sentry-apollo-3/build.gradle.kts @@ -24,7 +24,7 @@ dependencies { api(projects.sentry) api(projects.sentryKotlinExtensions) - implementation(Config.Libs.apolloKotlin) + compileOnly(Config.Libs.apolloKotlin) compileOnly(Config.CompileOnly.nopen) errorprone(Config.CompileOnly.nopenChecker) @@ -40,6 +40,7 @@ dependencies { testImplementation(Config.TestLibs.mockitoKotlin) testImplementation(Config.TestLibs.mockitoInline) testImplementation(Config.TestLibs.mockWebserver) + testImplementation(Config.Libs.apolloKotlin) } configure { diff --git a/sentry-apollo/build.gradle.kts b/sentry-apollo/build.gradle.kts index c7d15a0a22..d05a31856b 100644 --- a/sentry-apollo/build.gradle.kts +++ b/sentry-apollo/build.gradle.kts @@ -24,7 +24,7 @@ dependencies { api(projects.sentry) api(projects.sentryKotlinExtensions) - implementation(Config.Libs.apolloAndroid) + compileOnly(Config.Libs.apolloAndroid) compileOnly(Config.CompileOnly.nopen) errorprone(Config.CompileOnly.nopenChecker) @@ -41,6 +41,7 @@ dependencies { testImplementation(Config.TestLibs.mockitoInline) testImplementation(Config.TestLibs.mockWebserver) testImplementation(Config.Libs.apolloCoroutines) + testImplementation(Config.Libs.apolloAndroid) } configure { diff --git a/sentry-graphql/build.gradle.kts b/sentry-graphql/build.gradle.kts index 5e20682a8d..0ccd23ac80 100644 --- a/sentry-graphql/build.gradle.kts +++ b/sentry-graphql/build.gradle.kts @@ -22,7 +22,7 @@ tasks.withType().configureEach { dependencies { api(projects.sentry) - implementation(Config.Libs.graphQlJava) + compileOnly(Config.Libs.graphQlJava) compileOnly(Config.CompileOnly.nopen) errorprone(Config.CompileOnly.nopenChecker) @@ -38,6 +38,7 @@ dependencies { testImplementation(Config.TestLibs.mockitoKotlin) testImplementation(Config.TestLibs.mockWebserver) testImplementation(Config.Libs.okhttp) + testImplementation(Config.Libs.graphQlJava) } configure { diff --git a/sentry-jul/build.gradle.kts b/sentry-jul/build.gradle.kts index 4c978c179f..009561801b 100644 --- a/sentry-jul/build.gradle.kts +++ b/sentry-jul/build.gradle.kts @@ -21,7 +21,7 @@ tasks.withType().configureEach { dependencies { api(projects.sentry) - implementation(Config.Libs.slf4jApi) + compileOnly(Config.Libs.slf4jApi) compileOnly(Config.CompileOnly.nopen) errorprone(Config.CompileOnly.nopenChecker) @@ -35,6 +35,7 @@ dependencies { testImplementation(Config.TestLibs.kotlinTestJunit) testImplementation(Config.TestLibs.mockitoKotlin) testImplementation(Config.Libs.logbackClassic) + testImplementation(Config.Libs.slf4jApi) } configure { diff --git a/sentry-kotlin-extensions/build.gradle.kts b/sentry-kotlin-extensions/build.gradle.kts index fe10716085..c920b6cf33 100644 --- a/sentry-kotlin-extensions/build.gradle.kts +++ b/sentry-kotlin-extensions/build.gradle.kts @@ -22,7 +22,7 @@ tasks.withType().configureEach { dependencies { api(projects.sentry) - implementation(Config.Libs.coroutinesCore) + compileOnly(Config.Libs.coroutinesCore) compileOnly(Config.CompileOnly.nopen) errorprone(Config.CompileOnly.nopenChecker) @@ -34,6 +34,7 @@ dependencies { testImplementation(kotlin(Config.kotlinStdLib)) testImplementation(Config.TestLibs.kotlinTestJunit) testImplementation(Config.TestLibs.mockitoKotlin) + testImplementation(Config.Libs.coroutinesCore) } configure { diff --git a/sentry-log4j2/build.gradle.kts b/sentry-log4j2/build.gradle.kts index d1ee05a9b4..933b28bfc9 100644 --- a/sentry-log4j2/build.gradle.kts +++ b/sentry-log4j2/build.gradle.kts @@ -21,8 +21,8 @@ tasks.withType().configureEach { dependencies { api(projects.sentry) - implementation(Config.Libs.log4j2Api) - implementation(Config.Libs.log4j2Core) + compileOnly(Config.Libs.log4j2Api) + compileOnly(Config.Libs.log4j2Core) annotationProcessor(Config.Libs.log4j2Core) compileOnly(Config.CompileOnly.nopen) @@ -36,6 +36,8 @@ dependencies { testImplementation(kotlin(Config.kotlinStdLib)) testImplementation(Config.TestLibs.kotlinTestJunit) testImplementation(Config.TestLibs.mockitoKotlin) + testImplementation(Config.Libs.log4j2Api) + testImplementation(Config.Libs.log4j2Core) } configure { diff --git a/sentry-logback/build.gradle.kts b/sentry-logback/build.gradle.kts index ee5a67f67c..255e35022f 100644 --- a/sentry-logback/build.gradle.kts +++ b/sentry-logback/build.gradle.kts @@ -21,7 +21,7 @@ tasks.withType().configureEach { dependencies { api(projects.sentry) - implementation(Config.Libs.logbackClassic) + compileOnly(Config.Libs.logbackClassic) compileOnly(Config.CompileOnly.nopen) errorprone(Config.CompileOnly.nopenChecker) @@ -34,6 +34,7 @@ dependencies { testImplementation(kotlin(Config.kotlinStdLib)) testImplementation(Config.TestLibs.kotlinTestJunit) testImplementation(Config.TestLibs.mockitoKotlin) + testImplementation(Config.Libs.logbackClassic) } configure { diff --git a/sentry-openfeign/build.gradle.kts b/sentry-openfeign/build.gradle.kts index 770938a138..0679c42f41 100644 --- a/sentry-openfeign/build.gradle.kts +++ b/sentry-openfeign/build.gradle.kts @@ -21,7 +21,7 @@ tasks.withType().configureEach { dependencies { api(projects.sentry) - implementation(Config.Libs.feignCore) + compileOnly(Config.Libs.feignCore) compileOnly(Config.CompileOnly.nopen) errorprone(Config.CompileOnly.nopenChecker) @@ -36,6 +36,7 @@ dependencies { testImplementation(Config.TestLibs.mockitoKotlin) testImplementation(Config.TestLibs.awaitility) testImplementation(Config.TestLibs.mockWebserver) + testImplementation(Config.Libs.feignCore) } configure { diff --git a/sentry-spring-boot-starter-jakarta/build.gradle.kts b/sentry-spring-boot-starter-jakarta/build.gradle.kts index 3500a75d06..455100e114 100644 --- a/sentry-spring-boot-starter-jakarta/build.gradle.kts +++ b/sentry-spring-boot-starter-jakarta/build.gradle.kts @@ -27,8 +27,8 @@ dependencies { api(projects.sentrySpringJakarta) compileOnly(projects.sentryLogback) compileOnly(projects.sentryApacheHttpClient5) - implementation(Config.Libs.springBoot3Starter) - implementation(platform(SpringBootPlugin.BOM_COORDINATES)) + compileOnly(Config.Libs.springBoot3Starter) + compileOnly(platform(SpringBootPlugin.BOM_COORDINATES)) compileOnly(Config.Libs.springWeb) compileOnly(Config.Libs.springWebflux) compileOnly(Config.Libs.servletApiJakarta) @@ -58,6 +58,8 @@ dependencies { testImplementation(Config.TestLibs.mockWebserver) testImplementation(Config.Libs.okhttp) + testImplementation(Config.Libs.springBoot3Starter) + testImplementation(platform(SpringBootPlugin.BOM_COORDINATES)) testImplementation(Config.Libs.springBoot3StarterTest) testImplementation(Config.Libs.springBoot3StarterWeb) testImplementation(Config.Libs.springBoot3StarterWebflux) diff --git a/sentry-spring-boot-starter/build.gradle.kts b/sentry-spring-boot-starter/build.gradle.kts index 7dfaa49199..92f5166967 100644 --- a/sentry-spring-boot-starter/build.gradle.kts +++ b/sentry-spring-boot-starter/build.gradle.kts @@ -27,7 +27,7 @@ dependencies { api(projects.sentrySpring) compileOnly(projects.sentryLogback) compileOnly(projects.sentryApacheHttpClient5) - implementation(Config.Libs.springBootStarter) + compileOnly(Config.Libs.springBootStarter) compileOnly(platform(SpringBootPlugin.BOM_COORDINATES)) compileOnly(Config.Libs.springWeb) compileOnly(Config.Libs.springWebflux) @@ -56,6 +56,7 @@ dependencies { testImplementation(Config.TestLibs.mockitoKotlin) testImplementation(Config.TestLibs.mockWebserver) testImplementation(Config.Libs.okhttp) + testImplementation(Config.Libs.springBootStarter) testImplementation(Config.Libs.springBootStarterTest) testImplementation(Config.Libs.springBootStarterWeb) testImplementation(Config.Libs.springBootStarterWebflux)