[Build] randomizedtesting: Allow property values to be closures
Makes it easier to have property values that are evaluated at build time
rather than configuration time in a Gradle idiomatic way.
@@ -264,8 +264,12 @@ class RandomizedTestingTask extends DefaultTask {
throw new InvalidUserDataException('Seed should be ' +
'set on the project instead of a system property')
}
+ if (prop.getValue() instanceof Closure) {
+ sysproperty key: prop.getKey(), value: (prop.getValue() as Closure).call().toString()
+ } else {
sysproperty key: prop.getKey(), value: prop.getValue().toString()
}
+ }
systemProperty 'tests.seed', project.testSeed
for (Map.Entry<String, Object> envvar : environmentVariables) {
env key: envvar.getKey(), value: envvar.getValue().toString()
