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
Post a Comment