Skip to content

Commit

Permalink
Fix compatibility with older Gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
melix committed Feb 7, 2023
1 parent 9a9a8b5 commit 45ee396
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ public static Provider<NativeImageService> registerOn(Project project) {

private static Provider<Integer> maxParallelUsagesOf(ProviderFactory providers) {
return providers.gradleProperty(MAX_PARALLEL_SYSTEM_PROPERTY)
.orElse(providers.environmentVariable(MAX_PARALLEL_ENV_VAR))
.forUseAtConfigurationTime()
.orElse(providers.environmentVariable(MAX_PARALLEL_ENV_VAR).forUseAtConfigurationTime())
.map(Integer::parseInt)
.orElse(1 + Runtime.getRuntime().availableProcessors() / 16);
}
Expand Down

0 comments on commit 45ee396

Please sign in to comment.