Skip to content

Commit

Permalink
Remove usage of commons lang and add a trailing "." to possible build…
Browse files Browse the repository at this point in the history
… fork options
  • Loading branch information
dagrammy committed Jun 6, 2023
1 parent 5a34b16 commit ef63a7b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import javax.inject.Inject;

import org.apache.commons.lang3.StringUtils;
import org.gradle.api.Action;
import org.gradle.api.DefaultTask;
import org.gradle.process.JavaForkOptions;
Expand All @@ -21,8 +20,8 @@
import io.quarkus.utilities.OS;

public abstract class QuarkusTask extends DefaultTask {
private static final String[] WORKER_BUILD_FORK_OPTIONS = { "quarkus.package",
"quarkus.application", "quarkus.gradle-worker" };
private static final List<String> WORKER_BUILD_FORK_OPTIONS = List.of("quarkus.package.",
"quarkus.application.", "quarkus.gradle-worker.");

private final transient QuarkusPluginExtension extension;
protected final File projectDir;
Expand Down Expand Up @@ -98,7 +97,8 @@ private void configureProcessWorkerSpec(ProcessWorkerSpec processWorkerSpec, Map
// see https://github.com/quarkusio/quarkus/issues/33321 why not all properties are passed as system properties
// Note that we MUST NOT mess with the system properties of the JVM running the build! And that is the
// main reason why build and code generation happen in a separate process.
configMap.entrySet().stream().filter(e -> StringUtils.startsWithAny(e.getKey(), WORKER_BUILD_FORK_OPTIONS))
configMap.entrySet().stream()
.filter(e -> WORKER_BUILD_FORK_OPTIONS.stream().anyMatch(e.getKey().toLowerCase()::startsWith))
.forEach(e -> forkOptions.systemProperty(e.getKey(), e.getValue()));

// populate worker classpath with additional content?
Expand Down

0 comments on commit ef63a7b

Please sign in to comment.