autonomousapps / dependency-analysis-gradle-plugin

Gradle plugin for JVM projects written in Java, Kotlin, Groovy, or Scala; and Android projects written in Java or Kotlin. Provides advice for managing dependencies and other applied plugins
Apache License 2.0
1.66k stars 116 forks source link

Add flag to silent the console output for the ProjectHealthTask #1207

Open rohilchodankar opened 1 week ago

rohilchodankar commented 1 week ago

Is your feature request related to a problem? Please describe.

We currently use the `buildHealth` task in our CI pipeline to identify unused dependencies. The flag `dependency.analysis.print.build.health=false` is used to prevent output from being printed to the console. We would like to utilize the `projectHealth` task to run only on the modules that have been modified in the PR, which will help reduce execution time. However, I can't find a flag like `dependency.analysis.print.build.health` to suppress console logging for the `ProjectHealthTask` **Describe the solution you'd like**

Add a flag similar to dependency.analysis.print.build.health to prevent console logs or use the same flag in the ProjectHealthTask task

autonomousapps commented 6 days ago

The current flag exists because the output of buildHealth can be extremely large. The output of projectHealth is typically smaller. Still, I see no reason to not provide such a flag, but the default will probably be "on", even though the default for buildHealth is "off." Sound good?

rohilchodankar commented 6 days ago

Yeah that sounds good. Thanks