Skip to content

Conversation

cklein-arcadia
Copy link

@cklein-arcadia cklein-arcadia commented Aug 27, 2025

Currently the plugin prints out 5 separate log messages describing refs, configurations, versions, and describeTagFirstParent, plus a newline.

This is in addition to printing out the actual fully resolved version. The vast majority of the time this information is not valuable, but it gets printed even when running other gradle tasks (like compile!) in a project that uses this plugin.

This commit moves these messages to the info log level so they are not printed by default all the time, and instead only become visible if you add the --info (or higher) log level.

Example from my project's compileJava task before this change:

$ ./gradlew compileJava

> Configure project :
matching ref: TAG - 0.4.0-56c10c1
  ref configuration: TAG - pattern: .+
    version: ${ref}
    describeTagFirstParent: true

project version: 0.4.0-56c10c1

BUILD SUCCESSFUL in 882ms
4 actionable tasks: 4 up-to-date

Clearly this information is not relevant to users running the compileJava task.

And after this change:

$ ./gradlew compileJava

> Task :compileJava

BUILD SUCCESSFUL in 2s
4 actionable tasks: 1 executed, 3 up-to-date

And here's what it looks like when you run the version task:

$ ./gradlew :version

> Task :version
0.4.0-56c10c1

BUILD SUCCESSFUL in 522ms
1 actionable task: 1 executed

And

$ ./gradlew :version -q
0.4.0-56c10c1

Currently the plugin prints out 5 separate log messages describing refs,
configurations, versions, and describeTagFirstParent, plus a newline.

This is in addition to printing out the actual fully resolved version.
The vast majority of the time this information is not valuable, but it
gets printed even when running other gradle tasks (like compile!) in a
project that uses this plugin.

This commit moves these messages to the info log level so they are not
printed by default all the time, and instead only become visible if you
add the --info (or lower) log level.
@cklein-arcadia
Copy link
Author

FWIW, I also have an option that leaves the logging as-is and allows users to set quiet = true in their build.gradle to turn the logging down. Doesn't look quite as pretty because then you need to add conditionals to all the logging statements, but it would be a way to retain current behavior as the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant