Closed FelixZY closed 2 months ago
Is there no file at
> There were dependency violations. See report at file:///[REDACTED]/build/reports/dependency-analysis/build-health-report.txt
?
The file:///[REDACTED]/build/reports/dependency-analysis/build-health-report.txt
file does exist but it is not printed to stdout, neither is it in json format.
There is a file build-health-report.json
that is machine readable. The console report can be auto-printed by setting the flag
# gradle.properties
dependency.analysis.print.build.health=true
Indeed, next to build-health-report.txt
there was a build-health-report.json
. Setting dependency.analysis.print.build.health=true
in the project-wide gradle.properties also caused the expected printout. Thank you!
I think the dependency.analysis.print.build.health=true
requirement should be more obviously documented as current documentation makes it sound like the stdout print should happen by default.
Perhaps by updating the wiki like this?
The plugin enables these use-cases through the concept of "advice". When you execute the buildHealth task, it analyzes your entire project, including all variants for Android projects, and does two things:
- Prints that advice to disk in an easy-to-read format (
build/reports/dependency-analysis/build-health-report.txt
).- Prints that advice to disk as JSON for advanced users who want to automate post-processing the results (
build/reports/dependency-analysis/build-health-report.json
).You can also print the easy-to-read advice to stdout by setting
dependency.analysis.print.build.health=true
in your project-widegradle.properties
.
I've decided I'll just update the readme. Thanks for the report!
Plugin version 1.28.0
Gradle version 8.2
JDK version OpenJDK 19
(Optional) Kotlin and Kotlin Gradle Plugin (KGP) version Kotlin 1.8.20
(Optional) Android Gradle Plugin (AGP) version AGP 8.2.1
Describe the bug I'm probably missing something but the wiki clearly states:
When I execute the
buildHealth
I do not get any console output. Neither do I get a json file.To Reproduce Steps to reproduce the behavior:
id 'com.autonomousapps.dependency-analysis' version '1.28.0'
to theplugins
section of the project-widebuild.gradle
build.gradle
:Expected behavior
Additional context