From 757dde9a980efa5af7e55736305311a6d655a8fb Mon Sep 17 00:00:00 2001 From: Shadew Date: Mon, 10 Aug 2020 13:31:06 +0200 Subject: [PATCH] Stop double build from run configurations. --- .../gradle/common/util/runs/RunConfigGenerator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/java/net/minecraftforge/gradle/common/util/runs/RunConfigGenerator.java b/src/common/java/net/minecraftforge/gradle/common/util/runs/RunConfigGenerator.java index 466ca8a16..7536e51a1 100644 --- a/src/common/java/net/minecraftforge/gradle/common/util/runs/RunConfigGenerator.java +++ b/src/common/java/net/minecraftforge/gradle/common/util/runs/RunConfigGenerator.java @@ -169,7 +169,7 @@ public static TaskProvider createRunTask(final RunConfig runConfig, fi TaskProvider prepareRun = project.getTasks().register("prepare" + Utils.capitalize(runConfig.getTaskName()), Task.class, task -> { task.setGroup(RunConfig.RUNS_GROUP); - task.dependsOn(prepareRuns, runConfig.getAllSources().stream().map(SourceSet::getClassesTaskName).toArray()); + task.dependsOn(prepareRuns); File workDir = new File(runConfig.getWorkingDirectory()); @@ -180,7 +180,7 @@ public static TaskProvider createRunTask(final RunConfig runConfig, fi return project.getTasks().register(runConfig.getTaskName(), JavaExec.class, task -> { task.setGroup(RunConfig.RUNS_GROUP); - task.dependsOn(prepareRun.get()); + task.dependsOn(runConfig.getAllSources().stream().map(SourceSet::getClassesTaskName).toArray(), prepareRun.get()); File workDir = new File(runConfig.getWorkingDirectory());