Gradle Tooling : How to set environment variable -


i have custom plugin , writing tests test it. i'm using gradle tooling api (i found recommended way test).

one of test requires me run task setting environment variable. how test this. not see projectconnection providing way set environment variable.

if have manually test have :

setenv lrg_repos foo gradle verify_lrg -plrgname=abc 

where verify_lrg task added custom plugin.

currently solve this, running using processbuilder, know if there gradle tooling way (because other tests using gradle tooling api)

it possible configure environment variables via gradle tooling api since 3.5 version, see details @ https://github.com/gradle/gradle/pull/1029 https://github.com/gradle/gradle/blob/446468213543e32a0ce1bce0bbedabcfe925c572/subprojects/tooling-api/src/main/java/org/gradle/tooling/longrunningoperation.java#l190


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -