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

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"

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).

I’ll do that. Thank you.