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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -