| buildscript { |
| repositories { |
| mavenCentral() |
| maven { |
| name = "forge" |
| url = "http://files.minecraftforge.net/maven" |
| } |
| maven { |
| name = "sonatype" |
| url = "https://oss.sonatype.org/content/repositories/snapshots/" |
| } |
| } |
| dependencies { |
| classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' |
| } |
| } |
| |
| apply plugin: 'scala' |
| apply plugin: 'forge' |
| apply plugin: 'maven-publish' |
| |
| file "build.properties" withReader { |
| def prop = new Properties() |
| prop.load(it) |
| ext.config = new ConfigSlurper().parse prop |
| } |
| |
| version = "${config.oc.version}" |
| group = "li.cil.oc" |
| archivesBaseName = "OpenComputers" |
| |
| if (System.getenv("BUILD_NUMBER") != null) |
| version += ".${System.getenv("BUILD_NUMBER")}" |
| |
| if (config.oc.subversion != null && config.oc.subversion != "") |
| version += "-${config.oc.subversion}" |
| |
| ext.simpleVersion = version |
| version = "MC${config.minecraft.version}-${project.version}" |
| |
| runClient { |
| jvmArgs '-Dfml.coreMods.load=li.cil.oc.common.launch.TransformerLoader' |
| } |
| runServer { |
| jvmArgs '-Dfml.coreMods.load=li.cil.oc.common.launch.TransformerLoader' |
| } |
| |
| repositories { |
| maven { |
| name = "bc" |
| url = "http://mod-buildcraft.com/" |
| } |
| maven { |
| name = "chickenbones" |
| url = "http://chickenbones.net/maven/" |
| } |
| maven { |
| name = "ic2, forestry" |
| url = "http://maven.ic2.player.to/" |
| } |
| maven { |
| name = "mobius" |
| url = "http://mobiusstrip.eu/maven" |
| } |
| maven { |
| name = "ue" |
| url = "http://calclavia.com/maven/" |
| } |
| maven { |
| name "FireBall API Depot" |
| url "http://dl.tsr.me/artifactory/libs-release-local" |
| } |
| maven { |
| name 'DVS1 Maven FS' |
| url 'http://dvs1.progwml6.com/files/maven' |
| } |
| |
| ivy { |
| name 'Galacticraft' |
| artifactPattern "http://ci.micdoodle8.com/job/Galacticraft-1.7/${config.gc.build}/artifact/Forge/build/libs/[module]-BETA-1.7-[revision].${config.gc.build}.[ext]" |
| } |
| ivy { |
| name 'Mekanism' |
| artifactPattern "http://ci.indiewikis.com:8080/job/Mekanism/${config.mekanism.build}/artifact/output/[module]-${config.minecraft.version}-[revision].${config.mekanism.build}.[ext]" |
| } |
| ivy { |
| name 'ProjectRed' |
| artifactPattern "http://ci.indiewikis.com:8080/job/Project%20Red/${config.projred.build}/artifact/build/libs/[module]-${config.minecraft.version}-[revision].${config.projred.build}.[ext]" |
| } |
| ivy { |
| name 'immibis' |
| artifactPattern "https://dl.dropboxusercontent.com/u/2944265/mods/autobuilt/files/[module]-[revision].[ext]" |
| } |
| |
| ivy { |
| name 'CoFHLib' |
| artifactPattern "http://addons.cursecdn.com/files/${config.cofhlib.cf}/[module]-[revision].[ext]" |
| } |
| ivy { |
| name 'MineFactoryReloaded' |
| artifactPattern "http://addons.cursecdn.com/files/${config.mfr.cf}/[module]-[revision].[ext]" |
| } |
| ivy { |
| name 'ComputerCraft' |
| artifactPattern "http://addons.cursecdn.com/files/${config.cc.cf}/[module][revision].[ext]" |
| } |
| ivy { |
| name 'EnderIO' |
| artifactPattern "http://addons.cursecdn.com/files/${config.eio.cf}/[module]-[revision].[ext]" |
| } |
| ivy { |
| name 'Railcraft' |
| artifactPattern "http://addons.cursecdn.com/files/${config.rc.cf}/[module]_[revision].[ext]" |
| } |
| } |
| |
| configurations { |
| provided |
| embedded |
| compile.extendsFrom provided, embedded |
| } |
| |
| dependencies { |
| provided "api:rotarycraft:${config.rotc.version}" |
| provided "appeng:appliedenergistics2:${config.ae2.version}:dev" |
| provided "codechicken:CodeChickenLib:${config.minecraft.version}-${config.ccl.version}:dev" |
| provided "codechicken:EnderStorage:${config.minecraft.version}-${config.es.version}:dev" |
| provided "codechicken:ForgeMultipart:${config.minecraft.version}-${config.fmp.version}:dev" |
| provided "codechicken:NotEnoughItems:${config.minecraft.version}-${config.nei.version}:dev" |
| provided "codechicken:WR-CBE:${config.minecraft.version}-${config.wrcbe.version}:dev" |
| provided "com.gregoriust.gregtech:gregtech_${config.minecraft.version}:${config.gt.version}:dev" |
| provided "com.mod-buildcraft:buildcraft:${config.bc.version}:dev" |
| provided "dev.calclavia.resonantengine:resonant-engine:${config.re.version}:dev" |
| provided "mcp.mobius.waila:Waila:${config.waila.version}_${config.minecraft.version}:dev" |
| provided "net.industrial-craft:industrialcraft-2:${config.ic2.version}:dev" |
| provided "net.sengir.forestry:forestry_${config.minecraft.version}:${config.forestry.version}:dev" |
| provided "tmech:TMechworks:${config.minecraft.version}-${config.tmech.version}:deobf" |
| |
| provided name: 'GalacticraftCore', version: config.gc.version, ext: 'jar' |
| provided name: 'Mekanism', version: config.mekanism.version, ext: 'jar' |
| provided name: 'ProjectRed-Base', version: config.projred.version, ext: 'jar' |
| provided name: 'ProjectRed-Integration', version: config.projred.version, ext: 'jar' |
| provided name: 'redlogic', version: config.redlogic.version, ext: 'jar' |
| |
| provided name: 'CoFHLib', version: URLEncoder.encode(config.cofhlib.version, "UTF-8"), ext: 'jar' |
| provided name: 'MineFactoryReloaded', version: URLEncoder.encode(config.mfr.version, "UTF-8"), ext: 'jar' |
| provided name: 'ComputerCraft', version: config.cc.version, ext: 'jar' |
| provided name: 'EnderIO', version: config.eio.version, ext: 'jar' |
| provided name: 'Railcraft', version: config.rc.version, ext: 'jar' |
| |
| compile 'com.google.code.findbugs:jsr305:1.3.9' // Annotations used by google libs. |
| |
| embedded files('libs/OpenComputers-JNLua.jar', 'libs/OpenComputers-LuaJ.jar') |
| } |
| |
| idea.module.scopes.PROVIDED.plus += configurations.provided |
| eclipse.classpath.plusConfigurations += configurations.provided |
| |
| minecraft { |
| version = "${config.minecraft.version}-${config.forge.version}" |
| |
| replaceIn "li/cil/oc/OpenComputers.scala" |
| 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) { |
| include 'application.conf' |
| filter { line -> |
| line.replaceAll("@VERSION@", project.simpleVersion) |
| } |
| } |
| from(sourceSets.main.resources.srcDirs) { |
| exclude 'mcmod.info' |
| exclude 'application.conf' |
| } |
| } |
| |
| jar { |
| exclude "cofh/**" |
| configurations.embedded.each { dep -> |
| from(project.zipTree(dep)){ |
| exclude 'META-INF', 'META-INF/**' |
| } |
| } |
| classifier = 'universal' |
| manifest { |
| attributes FMLCorePlugin: "li.cil.oc.common.launch.TransformerLoader" |
| attributes FMLCorePluginContainsFMLMod: "true" |
| } |
| } |
| |
| javadoc { |
| include 'li/cil/oc/api/**' |
| } |
| |
| // because the normal default jar task has been modified to be obfuscated |
| task deobfJar(type: Jar) { |
| from sourceSets.main.output |
| exclude "cofh/**" |
| configurations.embedded.each { dep -> |
| from(project.zipTree(dep)){ |
| exclude 'META-INF', 'META-INF/**' |
| } |
| } |
| classifier = 'dev' |
| manifest { |
| attributes FMLCorePlugin: "li.cil.oc.common.launch.TransformerLoader" |
| attributes FMLCorePluginContainsFMLMod: "true" |
| } |
| } |
| |
| task apiJar(type: Jar) { |
| from sourceSets.main.output |
| from sourceSets.main.java |
| classifier = 'api' |
| include 'li/cil/oc/api/**' |
| } |
| |
| task javadocJar(type: Jar, dependsOn: javadoc) { |
| from 'build/docs/javadoc' |
| classifier 'javadoc' |
| } |
| |
| task sourcesJar(type: Jar) { |
| from sourceSets.main.java |
| from sourceSets.main.scala |
| classifier = 'sources' |
| } |
| |
| artifacts { |
| archives deobfJar |
| archives apiJar |
| archives javadocJar |
| archives sourcesJar |
| } |
| |
| publishing { |
| publications { |
| mavenJava(MavenPublication) { |
| artifact jar |
| artifact apiJar |
| artifact javadocJar |
| artifact sourcesJar |
| artifact deobfJar { classifier 'dev' } |
| } |
| } |
| repositories { |
| maven { |
| url "${config.maven.url}" |
| } |
| } |
| } |