Expose an environment method similar to that found on exec for nativebinary toolchain components


(rekh127) #1

Could you please expose a way of setting environment variables for the toolchain, like we can for exec tasks? They use the same configuration for args, why not for environment variables? For instance we could do this:

cppCompiler.args "-fdiagnostics-color=always"
cppCompiler.args "-fmessage-length=80"
cppCompiler.args "-fno-diagnostics-show-option"
cppCompiler.environment("GCC_COLOR",
     "error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01")

#2

Thanks for the input. I’ve raised GRADLE-3125 to track this feature.

However, we don’t have much bandwidth to work on this at the moment. If you’re interested in contributing then please raise this issue on the Gradle dev list (http://gradle.org/development).


(rekh127) #3

I’ll do that. Thank you.