GT5-Unofficial/build.gradle

158 lines
4.7 KiB
Groovy
Raw Normal View History

2015-08-21 19:45:39 +00:00
buildscript {
repositories {
2016-08-05 17:05:35 +00:00
jcenter()
2015-08-21 19:45:39 +00:00
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
2016-08-05 17:05:35 +00:00
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
2015-08-21 19:45:39 +00:00
}
}
2016-08-05 17:05:35 +00:00
apply plugin: 'net.minecraftforge.gradle.forge'
2015-08-21 19:45:39 +00:00
2015-10-19 02:50:44 +00:00
file "build.properties" withReader {
def prop = new Properties()
prop.load(it)
ext.config = new ConfigSlurper().parse prop
}
version = "${config.gt.version}"
group= "gregtech"
2015-08-21 19:45:39 +00:00
archivesBaseName = "gregtech"
minecraft {
2015-10-19 02:50:44 +00:00
version = "${config.minecraft.version}-${config.forge.version}"
2016-08-05 17:05:35 +00:00
mappings = "snapshot_20160518"
2016-08-05 16:33:08 +00:00
runDir = "run"
2015-08-21 19:45:39 +00:00
}
2015-10-19 02:50:44 +00:00
configurations {
provided
embedded
compile.extendsFrom provided, embedded
}
2015-08-21 19:45:39 +00:00
2015-10-19 02:50:44 +00:00
repositories {
maven {
name 'Forge'
url 'http://files.minecraftforge.net/maven'
}
maven {
name = "chickenbones"
url = "http://chickenbones.net/maven/"
}
maven {
name = "ic2, forestry"
url = "http://maven.ic2.player.to/"
}
maven { // EnderIO & EnderCore
name 'tterrag Repo'
url "http://maven.tterrag.com"
}
maven { // AppleCore
url "http://www.ryanliptak.com/maven/"
}
maven { //JEI
url "http://dvs1.progwml6.com/files/maven/"
}
2015-10-19 02:50:44 +00:00
ivy {
name "BuildCraft"
artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision]-[classifier].[ext]"
}
ivy {
name 'CoFHLib'
artifactPattern "http://addons-origin.cursecdn.com/files/${config.cofhlib.cf}/[module]-[revision].[ext]"
}
ivy {
name 'CoFHCore'
artifactPattern "http://addons-origin.cursecdn.com/files/${config.cofhcore.cf}/[module]-[revision].[ext]"
}
ivy {
name 'Railcraft'
artifactPattern "http://addons-origin.cursecdn.com/files/${config.railcraft.cf}/[module]_[revision].[ext]"
}
2016-03-27 17:41:23 +00:00
ivy {
name 'IC2NuclearControl'
artifactPattern "http://addons-origin.cursecdn.com/files/${config.nc.cf}/[module]-[revision].[ext]"
}
2015-10-19 02:50:44 +00:00
}
2015-08-21 19:45:39 +00:00
2015-10-19 02:50:44 +00:00
dependencies {
2016-08-05 16:33:08 +00:00
//provided ("appeng:appliedenergistics2:${config.ae2.version}:dev") {
// exclude module: '*'
//}
provided "codechicken:CodeChickenLib:${config.minecraft.version}-${config.codechickenlib.version}:deobf"
2016-08-05 16:33:08 +00:00
//provided "codechicken:CodeChickenCore:${config.minecraft.version}-${config.codechickencore.version}:dev"
//provided "codechicken:NotEnoughItems:${config.minecraft.version}-${config.nei.version}:dev"
2015-10-19 02:50:44 +00:00
provided "net.industrial-craft:industrialcraft-2:${config.ic2.version}:dev"
deobfCompile "net.sengir.forestry:forestry_${config.minecraft.version}:${config.forestry.version}"
deobfCompile "mezz.jei:jei_${config.minecraft.version}:+"
2016-08-05 16:33:08 +00:00
//provided "applecore:AppleCore:${config.applecore.version}:api"
//provided "com.enderio.core:EnderCore:${config.enderiocore.version}:dev"
//provided ("com.enderio:EnderIO:${config.enderio.version}:dev") {
// transitive = false
//}
//provided name: 'buildcraft', version: config.buildcraft.version, classifier: "dev", ext: 'jar'
//provided name: 'CoFHLib', version: config.cofhlib.version, ext: 'jar'
//provided name: 'CoFHCore', version: config.cofhcore.version, ext: 'jar'
//provided name: 'Railcraft', version: config.railcraft.version, ext: 'jar'
//provided name: 'IC2NuclearControl', version: config.nc.version, ext: 'jar'
2015-08-21 19:45:39 +00:00
}
2016-09-12 11:07:17 +00:00
compileJava {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
options.encoding = "UTF-8"
}
2015-08-21 19:45:39 +00:00
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, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
2015-10-19 02:50:44 +00:00
2016-08-05 17:05:35 +00:00
task source(type: Jar) {
2015-10-19 02:50:44 +00:00
from sourceSets.main.allSource
classifier = 'sources'
2016-09-12 11:07:17 +00:00
manifest {
attributes 'FMLCorePlugin': 'gregtech.asm.ASM'
attributes 'FMLCorePluginContainsFMLMod': 'true'
}
}
jar {
manifest {
attributes 'FMLCorePlugin': 'gregtech.asm.ASM'
attributes 'FMLCorePluginContainsFMLMod': 'true'
}
2015-10-03 13:23:52 +00:00
}
2015-10-19 02:50:44 +00:00
2016-08-05 17:05:35 +00:00
task dev(type: Jar) {
2015-10-19 02:50:44 +00:00
from sourceSets.main.output
classifier = 'dev'
manifest {
2016-09-12 11:07:17 +00:00
attributes 'FMLCorePlugin': 'gregtech.asm.ASM'
attributes 'FMLCorePluginContainsFMLMod': 'true'
}
2015-10-03 13:23:52 +00:00
}
2015-10-19 02:50:44 +00:00
2015-10-03 13:23:52 +00:00
artifacts {
2016-08-05 17:05:35 +00:00
archives dev
archives source
2015-10-03 13:23:52 +00:00
}