Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Trying to add a dependency


Ghosttje
 Share

Recommended Posts

am starting on a minecraft mod, but I cannot get the build.gradle right.

I wanted to create a mod on top of applied energistics but I cannot get it to build when I add this mod as a gradle dependency. I looked all the dependencies up on an other repository, but when I build it gives errors like below, and some other errors on the general minecraft code base

Error:(3, 26) java: package net.minecraft.init does not exist

This is the code I have right now:

 

buildscript {
    repositories {
        jcenter()
        maven { url = "http://files.minecraftforge.net/maven" }
    }
    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.

version = mod_version + "-" + mod_channel
group = mod_group
archivesBaseName = mod_basename

sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
compileJava {
    sourceCompatibility = targetCompatibility = '1.8'
}

minecraft {
    version = minecraft_version + "-" + forge_version

    replaceIn "package-info.java"

    replace "@version@", project.version
    replace "@modversion@", mod_version
    replace "@modchannel@", mod_channel

    // used when launching minecraft in dev env
    mappings = mcp_mappings
}

repositories {
    maven {
        name 'Mobius Repo'
        url "http://mobiusstrip.eu/maven"
    }
    maven {
        name = "JEI repo"
        url "http://dvs1.progwml6.com/files/maven"
    }
}

dependencies {
    // installable runtime dependencies
    compileOnly "mcp.mobius.waila:Hwyla:${hwyla_version}"

    // compile against provided APIs
    compileOnly "mezz.jei:jei_${minecraft_version}:${jei_version}:api"
    compileOnly "mcp.mobius.waila:Hwyla:${hwyla_version}"

    // at runtime, use the full JEI jar
    runtime "mezz.jei:jei_${minecraft_version}:${jei_version}"

    deobfCompile "appeng:appliedenergistics2:${ae_verion}"
}

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 'version':project.version, 'mcversion':project.minecraft.version
    }

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

The version that I am trying to add is:

ae_verion=rv5-stable-8

 

I posted my code on github if you want to take a look: https://github.com/Ghosi-dev-team/AE-Extensions/tree/development

Edited by Ghosttje
Removed spelling mistake
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.

Guest
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.