| buildscript { |
| repositories { |
| mavenCentral() |
| maven { |
| name = "forge" |
| url = "http://files.minecraftforge.net/maven" |
| } |
| } |
| dependencies { |
| classpath 'net.minecraftforge.gradle:ForgeGradle:1.0-SNAPSHOT' |
| } |
| } |
| |
| file "build.properties" withReader { |
| def prop = new Properties() |
| prop.load(it) |
| ext.config = new ConfigSlurper().parse prop |
| } |
| |
| apply plugin: 'forge' |
| |
| version = "${config.occ.version}" |
| group = "li.cil.occ" |
| archivesBaseName = "OpenComponents" |
| |
| if (System.getenv("BUILD_NUMBER") != null) |
| version += ".${System.getenv("BUILD_NUMBER")}" |
| |
| ext.simpleVersion = version |
| version = "MC${config.minecraft.version}-${project.version}" |
| |
| repositories { |
| maven { |
| name = "oc" |
| url = "http://maven.cil.li/" |
| } |
| } |
| |
| dependencies { |
| compile "li.cil.oc:OpenComputers:MC${config.minecraft.version}-${config.oc.version}:api" |
| } |
| |
| minecraft { |
| version = "${config.minecraft.version}-${config.forge.version}" |
| |
| replaceIn "li/cil/occ/OpenComponents.java" |
| replace "@VERSION@", project.simpleVersion |
| } |
| |
| processResources { |
| from(sourceSets.main.resources.srcDirs) { |
| include 'mcmod.info' |
| expand 'version': project.simpleVersion, 'mcversion': config.minecraft.version |
| } |
| from(sourceSets.main.resources.srcDirs) { |
| exclude 'mcmod.info' |
| } |
| } |
| |
| jar { |
| classifier = 'universal' |
| } |
| |
| // because the normal default jar task has been modified to be obfuscated |
| task deobfJar(type: Jar) { |
| from sourceSets.main.output |
| classifier = 'deobf' |
| } |
| |
| artifacts { |
| archives deobfJar |
| } |