Skip to content

Commit 1eca170

Browse files
committed
hard fail when anything other than java 7 is used for decomp
1 parent 85cf8c8 commit 1eca170

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/main/java/net/minecraftforge/gradle/user/UserBasePlugin.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,15 @@ public Object call()
118118
TaskExecutionGraph graph = project.getGradle().getTaskGraph();
119119
String path = project.getPath();
120120

121-
boolean hasSetup = graph.hasTask(path + "setupCIWorkspace") || graph.hasTask(path + "setupDecompWorkspace") || graph.hasTask(path + "setupDevWorkspace");
122-
boolean hasBuild = graph.hasTask(path + "eclipse") || graph.hasTask(path + "ideaModule");
121+
boolean hasSetupDecomp = graph.hasTask(path + "setupDecompWorkspace");
122+
boolean hasBuild = graph.hasTask(path + "eclipse") || graph.hasTask(path + "ideaModule") || graph.hasTask(path + "build");
123+
boolean isJava7 = System.getProperty("java.version").startsWith("1.7");
123124

124-
if (hasSetup && hasBuild)
125-
throw new RuntimeException("You're doing it wrong. You are running a setup task and an IDE task in the same command.");
125+
if (hasSetupDecomp)
126+
if (hasBuild)
127+
throw new RuntimeException("You're doing it wrong. You are running the setupDecompWorkspace task and an IDE/build task in the same command!");
128+
else if (!isJava7)
129+
throw new RuntimeException("The setupDecompWorkspace will only work with Java 7! This is fixed in ForgeGradle 1.2");
126130

127131
return null;
128132
}

0 commit comments

Comments
 (0)