diff --git a/testng-core-api/testng-core-api-build.gradle.kts b/testng-core-api/testng-core-api-build.gradle.kts index 403e316889..be08b1cf24 100644 --- a/testng-core-api/testng-core-api-build.gradle.kts +++ b/testng-core-api/testng-core-api-build.gradle.kts @@ -10,7 +10,7 @@ java { dependencies { api(projects.testngCollections) - api("com.github.spotbugs:spotbugs:_") + compileOnly("com.github.spotbugs:spotbugs:_") "guiceApi"(platform("com.google.inject:guice-bom:_")) "guiceApi"("com.google.inject:guice") diff --git a/testng-core/testng-core-build.gradle.kts b/testng-core/testng-core-build.gradle.kts index 57c5220e10..aea422557e 100644 --- a/testng-core/testng-core-build.gradle.kts +++ b/testng-core/testng-core-build.gradle.kts @@ -25,7 +25,7 @@ java { dependencies { api(projects.testngCoreApi) // Annotations have to be available on the compile classpath for the proper compilation - api("com.github.spotbugs:spotbugs:_") + compileOnly("com.github.spotbugs:spotbugs:_") api("com.beust:jcommander:_") "guiceApi"(platform("com.google.inject:guice-bom:_")) diff --git a/testng-runner-api/testng-runner-api-build.gradle.kts b/testng-runner-api/testng-runner-api-build.gradle.kts index c664be9634..cdc9b73cec 100644 --- a/testng-runner-api/testng-runner-api-build.gradle.kts +++ b/testng-runner-api/testng-runner-api-build.gradle.kts @@ -4,4 +4,5 @@ plugins { dependencies { api(projects.testngCoreApi) + compileOnly("com.github.spotbugs:spotbugs:_") }