Skip to content

Commit

Permalink
Simplify min processors logic
Browse files Browse the repository at this point in the history
Co-authored-by: Adam <152864218+adam-enko@users.noreply.github.com>
  • Loading branch information
3flex and adam-enko committed Feb 26, 2024
1 parent 135dc9f commit 1a2cc5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build-logic/src/main/kotlin/dokkabuild.java.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tasks.withType<Test>().configureEach {
maxParallelForks = if (System.getenv("GITHUB_ACTIONS") != null) {
Runtime.getRuntime().availableProcessors()
} else {
(Runtime.getRuntime().availableProcessors() / 2).takeIf { it > 0 } ?: 1
(Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
}

javaLauncher = javaToolchains.launcherFor {
Expand Down

0 comments on commit 1a2cc5f

Please sign in to comment.