115 lines
No EOL
3.2 KiB
Groovy
115 lines
No EOL
3.2 KiB
Groovy
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'
|
|
|
|
file "build.properties" withReader {
|
|
def prop = new Properties()
|
|
prop.load(it)
|
|
ext.config = new ConfigSlurper().parse prop
|
|
}
|
|
|
|
version = "${config.gt.version}"
|
|
group = "gregtech"
|
|
archivesBaseName = "gregtech"
|
|
|
|
minecraft {
|
|
version = "${config.minecraft.version}-${config.forge.version}"
|
|
mappings = "snapshot_20161111"
|
|
runDir = "run"
|
|
}
|
|
|
|
configurations {
|
|
provided
|
|
embedded
|
|
compile.extendsFrom provided, embedded
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
name = "chickenbones"
|
|
url = "http://chickenbones.net/maven/"
|
|
}
|
|
maven {
|
|
name = "ic2, forestry"
|
|
url = "http://maven.ic2.player.to/"
|
|
}
|
|
maven { //JEI
|
|
name = "Progwml6 maven"
|
|
url = "http://dvs1.progwml6.com/files/maven"
|
|
}
|
|
maven {
|
|
name = "CurseForge"
|
|
url = "https://minecraft.curseforge.com/api/maven/"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compile "codechicken:CodeChickenLib:${config.minecraft.version}-${config.codechickenlib.version}:deobf"
|
|
deobfCompile "net.industrial-craft:industrialcraft-2:${config.ic2.version}"
|
|
deobfCompile "net.sengir.forestry:forestry_${config.minecraft.version}:${config.forestry.version}"
|
|
|
|
// compile against the JEI API but do not include it at runtime
|
|
deobfCompile "mezz.jei:jei_${config.minecraft.version}:${config.jei.version}:api"
|
|
// at runtime, use the full JEI jar
|
|
runtime "mezz.jei:jei_${config.minecraft.version}:${config.jei.version}"
|
|
|
|
compile files('libs/Railcraft_1.10.2-10.2.0-dev.jar')
|
|
// deobfCompile name: 'worldcontrol', version: config.worldcontrol.version, ext: 'jar'
|
|
// deobfCompile name: 'CoFHCore', version: "${config.minecraft.version}-${config.cofh.version}", ext: 'jar'
|
|
// deobfCompile name: 'EnderCore', version: "${config.minecraft.version}-${config.endercore.version}", ext: 'jar'
|
|
// deobfCompile name: 'EnderIO', version: "${config.minecraft.version}-${config.enderio.version}", ext: 'jar'
|
|
}
|
|
|
|
sourceCompatibility = "1.8"
|
|
targetCompatibility = "1.8"
|
|
|
|
compileJava {
|
|
sourceCompatibility = "1.8"
|
|
targetCompatibility = "1.8"
|
|
options.encoding = "UTF-8"
|
|
}
|
|
|
|
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'
|
|
}
|
|
}
|
|
|
|
task source(type: Jar) {
|
|
from sourceSets.main.allSource
|
|
classifier = 'sources'
|
|
}
|
|
|
|
task dev(type: Jar) {
|
|
from sourceSets.main.output
|
|
classifier = 'dev'
|
|
}
|
|
|
|
artifacts {
|
|
archives dev
|
|
archives source
|
|
} |