kordamp / enforcer-gradle-plugin

Kordamp Enforcer Gradle Plugin
Apache License 2.0
23 stars 3 forks source link

Suppress banner output when -q option is given #23

Closed portalsoup closed 2 years ago

portalsoup commented 2 years ago

Is there a way to suppress the following output?

Kordamp Enforcer Gradle plugin 0.9.0. Consider becoming a patron at https://www.patreon.com/aalmiray

This is printing even with the -q flag. After introducing this plugin, our CI pipelines began failing because a few tasks which do nothing but print out specific properties for our CI system are now printing out this message as well.

If there isn't already, it would be very useful to have a way to suppress this output conditionally when in a fully automated environment where a human won't see it anyways.

aalmiray commented 2 years ago

This legend goes away after the 3rd showing as long ~/.gradle/caches is persisted between runs.

Currently there's no way to suppress it. This request is similar to https://github.com/jreleaser/jreleaser/issues/768 thus a fix is possible.

portalsoup commented 2 years ago

I see, since this runs in a fresh docker container each run I don't think it's possible to persist it between runs. That's a bummer, unless this is added, this might mean that we can't adopt this plugin as tying our CI's success to the valid state of previous runs doesn't seem like a good idea. This is a hosted shared environment that individual contributors don't have a full range of access to, so that cannot be guaranteed for us.

aalmiray commented 2 years ago

Understood. Most Kordamp plugins have this banner feature. It's not much of a problem to update them all to handle -q as suggested but it'll take a couple of weeks to get all the work sorted out and new versions released.

portalsoup commented 2 years ago

That would be fantastic. We can maintain our current process in the meantime. This plugin would be a huge benefit and simplification compared to our current approach.

aalmiray commented 2 years ago

Version 0.10.0 has the fix