Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get clean Gradle output on Travis CI?

Example output for a normal build on Travis CI using Gradle:

https://travis-ci.org/2m/gradle-travis-test/builds/8579228

Gradle seems to think that the console has the same capabilities as a normal ANSI console, while in reality it only supports some of those features. Specifically, it seems to support colors, but not updating/replacing text (it's append-only).

How can I tell Gradle to use "plain" console output?

like image 988
Ralf Avatar asked Jul 30 '13 09:07

Ralf


1 Answers

Gradle automatically detects the terminal type based on the $TERM environment variable (and a few other layers in between). Setting TERM=dumb causes Gradle to use plain console output.

In your .travis.yml file, you should now have something like the following (assuming the Gradle wrapper is used):

install:
  - TERM=dumb ./gradlew assemble

script:
  - TERM=dumb ./gradlew check

For sample output, see this build:

https://travis-ci.org/embarkmobile/zxing-android-minimal/builds/9639517

like image 132
Ralf Avatar answered Oct 06 '22 13:10

Ralf