Jump to content

Gradle task successful, but the .jar mod is nowhere to be found


CColdFox

Recommended Posts

What's the exact command you execute? 

Can you please post the contents of build.gradle? 

Can you please post the output of gradle?

Most likely, you're not executing the right task (build or assemble) or there's something messed up in your build.gradle. If you post it here, I'm pretty sure we can straighten this out very quickly.

Link to comment
Share on other sites

Here's my build.gradle:

buildscript {
    repositories {
        jcenter()
        maven {
            name = 'forge'
            url = 'https://maven.minecraftforge.net'
        }
        maven {
            name = 'SpongePowered'
            url = 'https://repo.spongepowered.org/repository/maven-public/'
        }
    }
    dependencies {
        classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
        classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
        classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
    }
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'org.spongepowered.mixin'
apply plugin: 'com.github.johnrengelman.shadow'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.


version = "2.1"
group = "fail.mercury.client" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Muffin"

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

minecraft {
    version = "1.12.2-14.23.5.2847"
    runDir = 'run'
    mappings = "snapshot_20171003"
    coreMod = 'fail.mercury.client.api.loader.MercuryLoader'
    makeObfSourceJar = false
}

repositories {
    maven {
        name = 'spongepowered-repo'
        url = 'https://repo.spongepowered.org/repository/maven-public/'
    }
    maven {
        name = "jitpack.io"
        url = "https://jitpack.io"
    }
    mavenCentral()
}

dependencies {
    compile "com.github.TeamEnergetic:EventAPI:1.3.0"
    compile "club.minnced:java-discord-rpc:2.0.1"
    compile("org.spongepowered:mixin:0.7.11-SNAPSHOT") {
        transitive = false
    }
    compile group: 'com.esotericsoftware', name: 'reflectasm', version: '1.11.1'
}
shadowJar {
    dependencies {
        include(dependency('org.spongepowered:mixin'))
        include(dependency('com.github.TeamEnergetic:EventAPI'))
        include(dependency('club.minnced:java-discord-rpc'))
        include(dependency('com.esotericsoftware:reflectasm'))
    }
    manifest {
        attributes(
                'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
                "FMLCorePlugin": 'fail.mercury.client.api.loader.MercuryLoader',
                "TweakOrder": 0,
                "MixinConfigs": 'mixins.mercury.json',
                'FMLAT': 'mercury_at.cfg'
        )
    }
    exclude 'dummyThing'
    exclude 'LICENSE.txt'
    classifier = 'build'
}

mixin {
    defaultObfuscationEnv searge
    add sourceSets.main, 'mixin.refmap.json'
}

reobf {
    shadowJar {
        mappingType = 'SEARGE'
        classpath = sourceSets.main.compileClasspath
    }
}

jar {
    manifest {
        attributes(
                'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
                "FMLCorePlugin": 'fail.mercury.client.api.loader.MercuryLoader',
                "TweakOrder": 0,
                "MixinConfigs": 'mixins.mercury.json',
                'FMLAT': 'mercury_at.cfg'
        )
    }
}

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'
    }
}

build.dependsOn(shadowJar)

Here's my gradle.log (I think that's the output?):

This mapping 'snapshot_20171003' was designed for MC 1.12! Use at your own peril.


 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

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