We made a change way back in 1.3 to enable colour-coded output when running the bootRun task in Gradle. The colour seems to have been lost again. Testing with old versions of Spring Boot suggests that something changed in Gradle 3.0. We get coloured output with 2.14.1 but its lost when upgrading to Gradle 3.0 without changing the version of Spring Boot. It'd be nice to see if we can get it back again somehow.

Comment From: wilkinsona

When building both with and without the daemon, System.getConsole() returns null so BootRun doesn't set spring.output.ansi.console-available to true in the forked process's environment. The colour-coded output can be enabled by setting the environment variable in build.gradle:

bootRun {
    environment 'spring.output.ansi.console-available', true
}

Comment From: wilkinsona

It no longer appears to be possible for us to detect the console automatically and set the necessary environment variable. Closing.

Comment From: philwebb

See https://github.com/gradle/gradle/issues/1251 for details on the Sytem.getConsole() change.