I would like our build to run in parallel in certain environments, so I have investigated calling the StartParameter method to turn parallel execution on and off.
After setting org.gradle.parallel=true in the gradle.properties file,
I have this code in our root project build.gradle file
if (userprops.get(‘is.automated.build’)) {
StartParameter sp = gradle.startParameter.newInstance()
sp.setParallelProjectExecutionEnabled(false)
gradle.rootProject.logger.info("*****Parallel is off");
}
I have confirmed it runs, but the build continues to use 8 parallel threads - what am I missing, and is this possible?