This is an example mod using the fork of ForgeGradle-1.2 made by anatawa12. This fork supports Gradle 4.4.1 and later. This example project uses Gradle 5.6.4.
You can download this example project from here, or use it as a template on Github. This project can be used as a replacement for Forge's 1.7.10 MDK.
Although this example project has some differences to Forge's 1.7.10 MDK, anatawa12's fork of ForgeGradle 1.2 can be used by most projects with only minimal changes to their Gradle build script.
Here is a list of changes to Forge's 1.7.10 MDK Gradle build script, to replace the official ForgeGradle 1.2 plugin with the fork. These changes are likely to work with most projects based on Forge's 1.7.10 MDK.
In the repositories block of the buildscript section, add jcenter, and switch the Forge maven to use HTTPS instead of HTTP:
repositories {
mavenCentral()
maven {
name = "forge"
- url = "http://files.minecraftforge.net/maven"
+ url = "https://maven.minecraftforge.net/"
}
Also in the dependencies block of the buildscript section, change the dependency on Forge's official ForgeGradle 1.2 to the fork:
dependencies {
- classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
+ classpath ('com.anatawa12.forge:ForgeGradle:1.2-1.1.+') {
+ changing = true
+ }
}
Lastly in the wrapper properties update gradle with this line:
- distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip
+ distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
The Gradle wrapper should also be changed to use Gradle 4.4.1 or higher.