问题
I am using gradle from a slightly unorthodox terminal, so Gradle's traditional "pretty" output does not work.
Is there a way I can specify in ~/.gradle/gradle.properties that --console=plain
should be used for every gradle command?
回答1:
Since Gradle 4.3 you can add a line to a file called gradle.properties
in your project's root directory:
org.gradle.console=plain
If you really need to make this system-wide (not just project-wide), you could make an alias for your gradle command, i.e on Linux:
alias gradle='gradle --console=plain'
回答2:
you can try to add this to your ~/.gradle/init.gradle
file
gradle.startParameter.colorOutput = false
this seems to do the trick on my osx terminal.
回答3:
Use org.gradle.console=plain
(Padding because this post-body has to be at least 30 characters long despite the complete and accurate answer taking only 28.)
来源:https://stackoverflow.com/questions/34213075/how-to-tell-gradle-to-use-console-plain-all-the-time