autonomousapps / autonomousapps/dependency-analysis-gradle-plugin
buildHealth does not respect root configuration severity for module-advice (JVM vs Android)
- Dominant language
- Kotlin
- Stars
- 2.2k
- Forks
- 158
- Avg merge
- 16h 25m
- Merged PRs (30d)
- 46
Description
**Plugin version**
1.21.1
**Gradle version**
8.3
**(Optional) Android Gradle Plugin (AGP) version**
8.3.0-alpha01
**Describe the bug**
This is my root build file configuration
```
dependencyAnalysis {
issues {
all {
onAny {
severity("fail")
}
}
}
}
```
If any submodule has a dependency violation, running `buildHealth` will fail as expected. However, I have a submodule that says it could be a jvm module rather than an Android library module. Running `projectHealth` on this module will fail as expected, but for some reason `buildHealth` will report this violation in the generated report, but not fail as expected.
**To Reproduce**
Steps to reproduce the behavior:
Have a project with an Android library module that could be a plain jvm module. Set up the root configuration as shown above. Run `buildHealth` and see it pass. Run `projectHealth` on the submodule and see it fail.
**Expected behavior**
`buildHealth` should fail on any violation of any submodule when `severity` is set to `fail` in the root build file.
Contributor guide
Research direction
Reproduce the behavior with the root build file configuration and the stated Gradle, plugin, and AGP versions. Compare buildHealth with projectHealth for an Android library that can be a JVM module, then verify that buildHealth fails when the root severity is set to fail.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100