Colour output in console from Gradle Exec task

plugins

(Aver Mimas) #1

Hello,

Is there any configuration available in Gradle’s Exec task that will allow maintaining coloured output to the console made by whatever process is being executed?

I’m using the node plugin (https://github.com/srs/gradle-node-plugin/blob/master/docs/node.md), which apparently is a wrapper around the core Exec task. Many node packages generate coloured output on the console. It’s very useful for debug purpose. Unfortunately, when I execute those node/npm packages through that Gradle plugin, the output to console is just plain.

I don’t think it’s an issue with that plugin. It’s probably how Gradle handles child processes. Please correct me if I’m mistaken. Are there any configuration available that will allow me to maintain the coloured output?