Add project property for workers count

This commit is contained in:
Mikhael Bogdanov
2019-06-04 10:58:21 +02:00
parent 7a2332fe36
commit 5123e1f078
+3 -1
View File
@@ -127,7 +127,9 @@ fun Project.projectTest(taskName: String = "test", parallel: Boolean = false, bo
} }
if (parallel) { if (parallel) {
maxParallelForks = Math.max(Runtime.getRuntime().availableProcessors() / 2, 1) maxParallelForks =
project.findProperty("kotlin.test.maxParallelForks")?.toString()?.toInt()
?: Math.max(Runtime.getRuntime().availableProcessors() / 2, 1)
} }
body() body()
} }