File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
src/main/java/net/minecraftforge/gradle/user Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments