Created
June 28, 2017 15:27
-
-
Save Xalcon/7044aaf98eb7dcff5ffa00d0d3cb07ae to your computer and use it in GitHub Desktop.
Didnt test it fully, but it seem to work.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 61b82b19fc1db023105041534128ef6561ce3fb8 Mon Sep 17 00:00:00 2001 | |
From: xalcon <xalcon@xalcon.net> | |
Date: Wed, 28 Jun 2017 17:26:21 +0200 | |
Subject: [PATCH] fixed idea task module configuration | |
--- | |
src/main/java/net/minecraftforge/gradle/user/UserBasePlugin.java | 6 +++--- | |
1 file changed, 3 insertions(+), 3 deletions(-) | |
diff --git a/src/main/java/net/minecraftforge/gradle/user/UserBasePlugin.java b/src/main/java/net/minecraftforge/gradle/user/UserBasePlugin.java | |
index 1a025ad..9a0ce18 100644 | |
--- a/src/main/java/net/minecraftforge/gradle/user/UserBasePlugin.java | |
+++ b/src/main/java/net/minecraftforge/gradle/user/UserBasePlugin.java | |
@@ -1137,7 +1137,7 @@ public abstract class UserBasePlugin<T extends UserBaseExtension> extends BasePl | |
{ | |
try | |
{ | |
- String module = task.getProject().getProjectDir().getCanonicalPath(); | |
+ String module = ((IdeaModel)task.getProject().getExtensions().getByName("idea")).getModule().getName() + "_" + getExtension().getRunSourceSet().getName(); | |
File root = task.getProject().getProjectDir().getCanonicalFile(); | |
File file = null; | |
@@ -1205,7 +1205,7 @@ public abstract class UserBasePlugin<T extends UserBaseExtension> extends BasePl | |
Document doc = root.getOwnerDocument(); | |
try | |
{ | |
- injectIntellijRuns(doc, project.getProjectDir().getCanonicalPath()); | |
+ injectIntellijRuns(doc, ((IdeaModel) project.getExtensions().getByName("idea")).getModule().getName()); | |
} | |
catch (Exception e) | |
{ | |
@@ -1280,7 +1280,7 @@ public abstract class UserBasePlugin<T extends UserBaseExtension> extends BasePl | |
addXml(child, "option", ImmutableMap.of("name", "ENABLE_SWING_INSPECTOR", "value", "false")); | |
addXml(child, "option", ImmutableMap.of("name", "ENV_VARIABLES")); | |
addXml(child, "option", ImmutableMap.of("name", "PASS_PARENT_ENVS", "value", "true")); | |
- addXml(child, "module", ImmutableMap.of("name", ((IdeaModel) project.getExtensions().getByName("idea")).getModule().getName() + '_' + getExtension().getRunSourceSet().getName())); | |
+ addXml(child, "module", ImmutableMap.of("name", module)); | |
addXml(child, "RunnerSettings", ImmutableMap.of("RunnerId", "Run")); | |
addXml(child, "ConfigurationWrapper", ImmutableMap.of("RunnerId", "Run")); | |
} | |
-- | |
2.12.2.windows.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment