When running Gradle tests on Travis CI, the terminal is usually set to dumb
mode, so you get very plain looking output. However, Travis does allow for colors in their logs.
This Gradle script plugin formats the Gradle test output in a slightly colorful way (made for Travis CI but works in terminal). It also adds a summary at the end.
Add the ColoredOutput.gradle to your project, for example at buildtools/ColoredOutput.gradle
At the top of your build.gradle
,
apply from: 'buildtools/ColoredOutput.gradle'
If you want Travis folding, you can enable it like so:
apply from: 'buildtools/ColoredOutput.gradle'
project.ext.set("TRAVIS_FOLDING", true)
Run your gradle tests. Run your gradle tests on Travis.
Terminal