dependency-analysis-gradle-plugin icon indicating copy to clipboard operation
dependency-analysis-gradle-plugin copied to clipboard

False negative on implementation dependency

Open oldergod opened this issue 3 years ago • 1 comments
trafficstars

I don't have a repro project but locally we are getting a false negative.

projectHealth will tell me

You asked about the dependency 'org.jetbrains.kotlinx:kotlinx-coroutines-rx2:1.6.4'.
You have been advised to change this dependency to 'testImplementation' from 'implementation'.

but when the dependency is set to testImplementation, I get compilation errors.

How could I debug that to ideally get it fixed upstream?

oldergod avatar Aug 17 '22 17:08 oldergod

Thanks for the issue.

As a start, you could run ./gradlew <some project>:reason --id org.jetbrains.kotlinx:kotlinx-coroutines-rx2 and see what it says. It might also be interesting to see the compilation error so we can try to reason about what the usage of that dependency actually is and why the plugin may not "see" it. Maybe the issue is that the your project is using a transitive dependency and not that dependency itself. How are you configuring this plugin?

autonomousapps avatar Sep 06 '22 06:09 autonomousapps