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

JSON pretty print option #1205

Open seregamorph opened 1 week ago

seregamorph commented 1 week ago

Change

Add System property "com.autonomousapps.pretty-json" to do pretty print in JSON task outputs.

Motivation

Tasks produce (mostly) JSON outputs which are friendly for text comparison between executions - either with changes in set of project dependencies or in the logic of the dependency-analysis plugin itself. But by default they are single-line JSONs, hence we need an options to pretty-print (a.k.a. indent) it.

Note: the task outputs are reproducible (once this is merged https://github.com/autonomousapps/dependency-analysis-gradle-plugin/pull/1202 )