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

buildHealth does not respect root configuration severity for module-advice (JVM vs Android)

Open Vichy97 opened this issue 2 years ago • 4 comments
trafficstars

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.

Vichy97 avatar Sep 06 '23 17:09 Vichy97

Thanks for the report. Does this only happen with that specific kind of advice, or also dependency-related advice?

autonomousapps avatar Sep 07 '23 19:09 autonomousapps

Thanks for the report. Does this only happen with that specific kind of advice, or also dependency-related advice?

This only seems to happen with that specific advice. Dependency related advice will always respect the root configuration severity

Vichy97 avatar Sep 10 '23 19:09 Vichy97

Are you able to reproduce this with 1.24.0?

autonomousapps avatar Oct 01 '23 20:10 autonomousapps

@autonomousapps Yes, same result on 1.24.0

Vichy97 avatar Oct 02 '23 15:10 Vichy97