Jump to content

Upgrading from gradle 4.5 and forgegradle "2.1-SNAPSHOT" to a newer version of both


gwoonryan

Recommended Posts

Hi, I need some help upgrading my Gradle and ForgeGradle versions for my 1.8.9 mod.
I just started modding for forge. I do have quite some experience with coding in Java, but I always used the Maven build system instead of Gradle, so this is still quite hard for me.
If I load my "build.gradle" it tells me that I need to / that it is better to upgrade my ForgeGradle to a 5.x version, I guess that I need to upgrade my Gradle then also? (IntelliJ was already mad that I was using this old of a version).

Can someone maybe help me with this because I don't even really know where to start...
(I tried just upgrading Gradle and changing the version of ForgeGradle, but I couldn't get anything working)

This is my last working build.gradle (for gradle 4.5 and ForgeGradle 2.1-SNAPSHOT):

Spoiler

 

// For those who want the bleeding edge
buildscript {
    repositories {
        jcenter()
        maven {
            name = "forge"
            url = "http://files.minecraftforge.net/maven"
        }
    }
    dependencies {
        classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
    }
}
apply plugin: 'net.minecraftforge.gradle.forge'

version = "1.1"
group= "me.ryan.ryanair"
archivesBaseName = "ryanair"

minecraft {
    version = "1.8.9-11.15.1.2318-1.8.9"
    runDir = "run"
    mappings = "stable_20"
}

dependencies {

}

processResources
        {
            // this will ensure that this task is redone when the versions change.
            inputs.property "version", project.version
            inputs.property "mcversion", project.minecraft.version

            // replace stuff in mcmod.info, nothing else
            from(sourceSets.main.resources.srcDirs) {
                include 'mcmod.info'

                // replace version and mcversion
                expand '1.1':project.version, '1.8.9':project.minecraft.version
            }

            // copy everything else, thats not the mcmod.info
            from(sourceSets.main.resources.srcDirs) {
                exclude 'mcmod.info'
            }
        }

task copyJarToBin(type: Copy) {
    from "path\\to\\my\\modding\\folder\\Ryanair\\build\\libs\\ryanair-1.1.jar"
    into "path\\to\\my\\mc\\instance\\mods"
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.