👷 Run tests in parallel
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 4 May 2019 19:23:30 +0000 (21:23 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 4 May 2019 19:23:30 +0000 (21:23 +0200)
build.gradle

index 1cee731..4709a8b 100644 (file)
@@ -60,6 +60,10 @@ dependencies {
 
 apply from: 'version.gradle'
 
+test {
+    maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
+}
+
 task fatJar(type: Jar) {
     archiveName = project.name + '-jar-with-dependencies.jar'
     from { (configurations.runtime - configurations.provided).collect { it.isDirectory() ? it : zipTree(it) } }