MinecraftForge / ForgeGradle

Minecraft mod development framework used by Forge and FML for the gradle build system
GNU Lesser General Public License v2.1
520 stars 444 forks source link

Build failed in IDEA: Failed to apply plugin [id 'net.minecraftforge.gradle.forge'] #711

Closed 123l314 closed 4 years ago

123l314 commented 4 years ago

When I built in IDEA , one error occurred

A problem occurred evaluating root project 'forge-1.12.2-14.23.5.2854-mdk'.

Failed to apply plugin [id 'net.minecraftforge.gradle.forge'] Could not create task of type 'PostDecompileTask'.

I tried to build it via "cmd" :

gradlew build

gradlew setupDecompWorkspace

gradlew idea

Still like that

I added something to build.gradle:

buildscript { repositories { jcenter() maven { url = "http://files.minecraftforge.net/maven" } maven { url = "https://repo1.maven.org/maven2" } // I only added this } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' } } apply plugin: 'net.minecraftforge.gradle.forge' //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. ...

There is another one error:

ERROR: Unable to load class 'com.github.abrarsyed.jastyle.ASFormatter'. Possible causes for this unexpected error include: Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project (requires network)

The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem. Stop Gradle build processes (requires restart)

Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of >Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

TheCurle commented 4 years ago

ForgeGradle 2.3 is outdated and not supported. Update to a modern version

123l314 commented 4 years ago

When I updated to 3.0 ,

Plugin with id 'net.minecraftforge.gradle.forge' not found.

FinnT730 commented 4 years ago

1.12 is also not supported anymore, 1.15.2 and 1.16 are

TheCurle commented 4 years ago

You're just throwing words together and hoping it makes a script. Take 5 minutes to read through the code in this repo, and the problem will be evident. If you still can't figure it out, I pray for you.