Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make “gradle --console=rich” the default?

Tags:

gradle

Along the lines of this answer (which works for me, BTW) and the javadocs, I tried

gradle.startParameter.consoleOutput = org.gradle.api.logging.configuration.ConsoleOutput.Rich

in my ~/.gradle/init.gradle. However, I still need --console=rich to get color output. Why?

Tested with Gradle 2.14.1 and 3.2.1.

Terminal is cygwin urxvt with TERM variable set to rxvt-unicode-256color.

like image 824
EndlosSchleife Avatar asked Feb 07 '17 16:02

EndlosSchleife


1 Answers

Since Gradle 4.3 you can use org.gradle.console property in gradle.properties:

org.gradle.console=rich

A new console verbose mode will print outcomes of all tasks (like UP-TO-DATE) like Gradle 3.5 and earlier did. You can set this via --console=verbose or by a new Gradle property org.gradle.console=(plain rich verbose).

like image 102
Eduard Wirch Avatar answered Sep 27 '22 17:09

Eduard Wirch