Skip to content

Commit

Permalink
Use coerceAtLeast
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Jul 12, 2024
1 parent c2986dc commit 1a5cefd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ tasks.withType<Test>().configureEach {
maxParallelForks = if (isCiBuild) {
Runtime.getRuntime().availableProcessors()
} else {
// https://docs.gradle.org/8.0/userguide/performance.html#execute_tests_in_parallel
(Runtime.getRuntime().availableProcessors() / 2).takeIf { it > 0 } ?: 1
// https://docs.gradle.org/8.8/userguide/performance.html#execute_tests_in_parallel
(Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
}
}

Expand Down

0 comments on commit 1a5cefd

Please sign in to comment.