autonomousapps / autonomousapps/dependency-analysis-gradle-plugin
Baseline support
- Dominant language
- Kotlin
- Stars
- 2.2k
- Forks
- 158
- Avg merge
- 16h 25m
- Merged PRs (30d)
- 46
Description
**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:
```gradle
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:
```gradle
dependencyAnalysis {
baseline.set(layout.projectDirectory.file("foo/bar"))
}
```
**Describe alternatives you've considered**
This is currently possible by listing them one by one, like:
```gradle
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)
Contributor guide
Research direction
The requested entry point is `gradlew buildHealthBaseline`, with configuration under `dependencyAnalysis.baseline`; Android Lint and issues #271 and #16 provide context. Start by tracing the existing dependency-analysis DSL, reporting, and exclusion handling. Done means generating a version-controlled baseline that accepts current findings while still detecting future problems.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100