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

Baseline support

Open TWiStErRob opened this issue 2 years ago • 3 comments
trafficstars

Is your feature request related to a problem? Please describe. In a big project it would be helpful to be able to generate a baseline to prevent future problems, and temporarily accept the current ones.

Describe the solution you'd like gradlew buildHealthBaseline with a configurable location:

ideally there would be individual baseline files like in Android Lint:
dependencyAnalysis {
  baseline {
    allprojects.forEach {
      project(it.path) {
        baseline.set(it.rootDir.file("config/deps/baseline-${project.name}.xxx"))
      }
    }
  }
}

but a single file is also a win:

dependencyAnalysis {
  baseline.set(layout.projectDirectory.file("foo/bar"))
}

Describe alternatives you've considered This is currently possible by listing them one by one, like:

project(":foo:bar:baz") {
  onUnusedDependencies {
    exclude(libs.android.guava.get().toString())
  }
}

sadly, this is very tedious, and also leaves more tech debt than before because of potentially unused configuration (#271), and it is sometimes hard to match the warning text to the DSL.

Additional context See also #271 and mind version control (see https://github.com/autonomousapps/gradle-best-practices-plugin/issues/16)

TWiStErRob avatar Mar 10 '23 14:03 TWiStErRob

Thanks for the issue. I've often thought about this.

autonomousapps avatar Apr 21 '23 15:04 autonomousapps

@autonomousapps

The requested feature is useful for long living projects. Just mentioning this in hope the priority of the feature would be increased

ajax-gnatiuk-s avatar May 14 '24 09:05 ajax-gnatiuk-s

Unfortunately, I don't have time for things that aren't bug fixes or non-critical enhancements right now. I am open to sponsored work, however.

autonomousapps avatar May 15 '24 22:05 autonomousapps