129 lines
No EOL
3.7 KiB
Groovy
129 lines
No EOL
3.7 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 '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 { //JEI
|
|
url "http://dvs1.progwml6.com/files/maven/"
|
|
}
|
|
ivy {
|
|
name 'WorldControl'
|
|
artifactPattern "http://addons-origin.cursecdn.com/files/${config.worldcontrol.cf}/[module]-[revision].[ext]"
|
|
}
|
|
ivy {
|
|
name 'Railcraft'
|
|
artifactPattern "http://addons-origin.cursecdn.com/files/${config.railcraft.cf}/[module]_[revision].[ext]"
|
|
}
|
|
ivy {
|
|
name 'CoFHCore'
|
|
artifactPattern "http://addons-origin.cursecdn.com/files/${config.cofh.cf}/[module]-[revision].[ext]"
|
|
}
|
|
ivy {
|
|
name "EnderCore"
|
|
artifactPattern "https://addons-origin.cursecdn.com/files/${config.endercore.cf}/[module]-[revision].[ext]"
|
|
}
|
|
ivy {
|
|
name "EnderIO"
|
|
artifactPattern "https://addons-origin.cursecdn.com/files/${config.enderio.cf}/[module]-[revision].[ext]"
|
|
}
|
|
}
|
|
|
|
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}"
|
|
deobfCompile "mezz.jei:jei_${config.minecraft.version}:+"
|
|
// deobfCompile name: 'worldcontrol', version: config.worldcontrol.version, ext: 'jar'
|
|
deobfCompile name: 'Railcraft', version: "${config.minecraft.version}-${config.railcraft.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
|
|
} |