JVM fork options for Gradle task test from Java plugin -


i have 2 gradle tasks type test (from java gradle plugin):

task testsa(type: test) {   usetestng {     includegroups 'typea'   }   systemproperty 'hostname' 'localhost' }  task testsb(type: test) {   usetestng {     includegroups 'typeb'   }   systemproperty 'hostname' 'localhost' } 

this systemproperty() method comes java plugin , calls systemproperty() on defaultjavaforkoption object, private , final.

is there way set fork system property "hostname" once (in other method or variable) , use in both of tasks?

note i'm not interested in defining gradle variable "hostname" , reusing value systemproperty method.

i hope:

tasks.withtype(test) {     systemproperty "hostname" "localhost"  } 

does job, can't test it.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -