I am running gradle commands from command line and I want to show only output. There is an option -q, -quiet which says it will log errors only. After running command I get this crap with output too. How can I stop this ??
Welcome to Gradle 2.11.
To run a build, run gradle <task> ...
To see a list of available tasks, run gradle tasks
To see a list of command-line options, run gradle --help
To see more detail about a task, run gradle help --task <task>
Workaround for this, you can simply run gradle --version
first before running your command.
Example:
gradle --version # the welcome message will appear here
gradle -q mycommand # there should be no welcome message anymore
EDIT: Workaround from gradle github issues: https://github.com/gradle/gradle/issues/5213#issuecomment-391976595
This can be configured in file gradle.properties
:
systemProp.org.gradle.internal.launcher.welcomeMessageEnabled=false
In Gradle 7.5 there is a new flag that can be set in gradle.properties
org.gradle.welcome=(never,once)
Controls whether Gradle should print a welcome message. If set to never then the welcome message will be suppressed. If set to once then the message is printed once for each new version of Gradle. Default is
once
.
https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties
You can set this property in several ways. The first one found wins.
command line, as set using the -P / --project-prop environment options.
gradle.properties
in GRADLE_USER_HOME
directory.
gradle.properties
in project root directory.
gradle.properties
in Gradle installation directory.
So, to suppress this in CI/CD add
org.gradle.welcome=never
to $projectDir/gradle.properties
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With