From 2b4d9fd3bcecadb33228de3dccd43bef9bc18681 Mon Sep 17 00:00:00 2001 From: Dinolek Date: Sat, 27 Apr 2019 19:45:07 +0200 Subject: [PATCH] eclipse wants run dir too (#84) --- src/main/java/net/fabricmc/loom/task/GenEclipseRunsTask.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/fabricmc/loom/task/GenEclipseRunsTask.java b/src/main/java/net/fabricmc/loom/task/GenEclipseRunsTask.java index 1ff14b2..7c57561 100644 --- a/src/main/java/net/fabricmc/loom/task/GenEclipseRunsTask.java +++ b/src/main/java/net/fabricmc/loom/task/GenEclipseRunsTask.java @@ -24,6 +24,7 @@ package net.fabricmc.loom.task; +import net.fabricmc.loom.LoomGradleExtension; import net.fabricmc.loom.util.RunConfig; import org.apache.commons.io.FileUtils; import org.gradle.api.tasks.TaskAction; @@ -47,6 +48,9 @@ public class GenEclipseRunsTask extends DefaultLoomTask { if(!serverRunConfigs.exists()) FileUtils.writeStringToFile(serverRunConfigs, serverRunConfig, StandardCharsets.UTF_8); + File runDir = new File(getProject().getRootDir(), this.getProject().getExtensions().getByType(LoomGradleExtension.class).runDir); + if(!runDir.exists()) + runDir.mkdirs(); } }