Skip to content

Commit

Permalink
Use the build JVM for executing third party audit checks (#66379)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-vieira authored Dec 15, 2020
1 parent 6bc56d1 commit 87fafc7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.gradle.api.Task;
import org.gradle.api.artifacts.Configuration;
import org.gradle.api.tasks.TaskProvider;
import org.gradle.internal.jvm.Jvm;

import java.nio.file.Path;

Expand Down Expand Up @@ -58,7 +59,7 @@ public TaskProvider<? extends Task> createTask(Project project) {
TaskProvider<ThirdPartyAuditTask> audit = project.getTasks().register("thirdPartyAudit", ThirdPartyAuditTask.class);
audit.configure(t -> {
t.dependsOn(resourcesTask);
t.setJavaHome(BuildParams.getRuntimeJavaHome().toString());
t.setJavaHome(Jvm.current().getJavaHome().getPath());
t.getTargetCompatibility().set(project.provider(BuildParams::getRuntimeJavaVersion));
t.setSignatureFile(resourcesDir.resolve("forbidden/third-party-audit.txt").toFile());
});
Expand Down

0 comments on commit 87fafc7

Please sign in to comment.