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

`primary` feature gives advices to add already added dependencies

Open BraisGabin opened this issue 1 year ago • 1 comments
trafficstars

Plugin version 1.30.0 (but it was present before too)

Gradle version 8.6

JDK version 17

(Optional) Kotlin and Kotlin Gradle Plugin (KGP) version 1.9.22

(Optional) Android Gradle Plugin (AGP) version 8.2.2

Describe the bug I have a project like this: consumer -> unused -> used ~and consumer only uses :used~ (this is not important, if consumer uses both the problem is still there). And a bundle like this:

bundle('facade') {
  includeDependency(':unused')
  includeDependency(':used')
}

I expect not advices. And that works! But when I change the bundle to this:

bundle('facade') {
  primary(':unused')
  includeDependency(':used')
}

I also expect not advices but I get an advice telling me that :consumer should depend on :unused. But :consumer already depends on :unused so the advice shouldn't exist

To Reproduce Steps to reproduce the behavior:

  1. Go to src/functionalTest/groovy/com/autonomousapps/jvm/projects/BundleProject2.groovy and edit the line 31 from includeDependency to primary
  2. Run the test

Expected behavior No advices

BraisGabin avatar Feb 19 '24 12:02 BraisGabin

Thanks for the report.

autonomousapps avatar Feb 22 '24 20:02 autonomousapps