buildscript { repositories { jcenter() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT' } } apply plugin: 'net.minecraftforge.gradle.forge' ext.configFile = file "build.properties" configFile.withReader { def prop = new Properties() prop.load(it) project.ext.config = new ConfigSlurper().parse prop } version=config.mod.version group= "modtweaker" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "ModTweaker2" minecraft { version = "${config.forge.version}" runDir = "eclipse" replace "@modVersion@", config.mod.version mappings = "stable_29" } sourceCompatibility = targetCompatibility = "1.8" // Need this here so eclipse task generates correctly. compileJava { sourceCompatibility = targetCompatibility = "1.8" } repositories { mavenLocal() mavenCentral() } dependencies { } processResources { inputs.property "version", project.version inputs.property "mcversion", config.minecraft.version from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' expand 'version':project.version, 'mcversion':config.minecraft.version } from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } } task deobfJar(type: Jar) { from sourceSets.main.output classifier = 'deobf' } tasks.build.dependsOn deobfJar