In a multi-project build, I would like to define for each subproject ‘test.maxParallelForks’ as ‘Runtime.getRuntime().availableProcessors() * (1 + ratioOfWaitTimeToComputeTime)’ where each subproject can define ‘ratioOfWaitTimeToComputeTime’.
I’ve created the following function:
int numberOfForks(int ratioOfWaitTimeToComputeTime) {
Runtime.getRuntime().availableProcessors() * (1 + ratioOfWaitTimeToComputeTime)
}
and did:
subprojects {
test {
// TODO: allow different settings per subproject
int ratioOfWaitTimeToComputeTime = 2
maxParallelForks numberOfForks(ratioOfWaitTimeToComputeTime)
}
}
How do I verify that the setting is actually taking place?