build.gradle 1.72 KB
buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
        maven {
            name = "sonatype"
            url = "https://oss.sonatype.org/content/repositories/snapshots/"
        }
        maven {
            name = "forge"
            url = "http://files.minecraftforge.net/maven"
        }
        maven {
            name = 'sponge'
            url = 'http://repo.spongepowered.org/maven'
        }
    }
    dependencies {
        classpath 'net.minecraftforge.gradle:ForgeGradle:' + project.forgeGradleVersion
        classpath 'org.spongepowered:mixingradle:0.5-SNAPSHOT'
    }
}

apply plugin: 'net.minecraftforge.gradle.liteloader'
apply plugin: 'org.spongepowered.mixin'

group = "com.mumfrey.examplemod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "examplemod"

minecraft {
    // these values are defined in the gradle.properties file, so that this file does not need to be altered
    version = project.mcVersion
    mappings = project.mcMappings
    runDir = "run"
}

sourceSets {
    main {
        // Refmap declaration must match the refmap name specified in the json config
        ext.refMap = "mixins.example.refmap.json"
    }
}

mixin {
    // liteloader does not do runtime deobfuscation, so in production we use "notch names", mixin needs to know this
    defaultObfuscationEnv notch
}

litemod {
    json {
        name = "test"
        mcversion = project.targetVersion
        description = "An example litemod project which draws a clock in-game" 
        mixinConfigs += "mixins.example.json"
    }
}

jar {
    // The litemod task above generates the litemod.json dynamically, you can replace it with a resource if you want more control
    from litemod.outputs
}