Skip to content

Commit 0287d55

Browse files
JakeWhartonakarnokd
authored andcommitted
Parallelize unit test execution for speed! (#4113)
1 parent cc6f5e5 commit 0287d55

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,12 @@ if (project.hasProperty('release.useLastTag')) {
4040
tasks.prepare.enabled = false
4141
}
4242

43-
test{
44-
maxHeapSize = "2g"
43+
test {
44+
maxHeapSize = "2g"
45+
46+
if (System.getenv('CI') == null) {
47+
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
48+
}
4549
}
4650

4751
jacoco {

0 commit comments

Comments
 (0)