GT5-Unofficial/build.gradle

114 lines
No EOL
2.9 KiB
Groovy

buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-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_20170928"
runDir = "run"
}
configurations {
provided
embedded
compile.extendsFrom provided, embedded
}
repositories {
maven {
name = "ic2, forestry"
url = "http://maven.ic2.player.to/"
}
maven { //JEI
name = "Progwml6 maven"
url = "http://dvs1.progwml6.com/files/maven"
}
maven {
name = "tterrag maven"
url = "http://maven.tterrag.com/"
}
maven {
name = "CurseForge"
url = "https://minecraft.curseforge.com/api/maven/"
}
}
dependencies {
deobfCompile("net.sengir.forestry:forestry_${config.minecraft.version}:${config.forestry.version}") {
transitive = false
}
// deobfCompile "com.enderio.core:EnderCore:${config.minecraft.version}-${config.endercore.version}:dev"
// deobfCompile "com.enderio:EnderIO:${config.minecraft.version}-${config.enderio.version}:dev"
// 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}"
// deobfCompile name: 'worldcontrol', version: config.worldcontrol.version, ext: 'jar'
// deobfCompile name: 'CoFHCore', version: "${config.minecraft.version}-${config.cofh.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
}