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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -