2015-01-11 20:59:45 +01:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2016-02-27 13:21:27 +01:00
|
|
|
jcenter()
|
2015-01-11 20:59:45 +01:00
|
|
|
maven {
|
|
|
|
name = "forge"
|
|
|
|
url = "http://files.minecraftforge.net/maven"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
dependencies {
|
2016-07-09 22:30:50 +02:00
|
|
|
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
|
2015-01-11 20:59:45 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-02-27 13:21:27 +01:00
|
|
|
apply plugin: 'net.minecraftforge.gradle.forge'
|
2015-01-11 20:59:45 +01:00
|
|
|
|
2015-10-07 16:36:04 +02:00
|
|
|
ext.configFile = file "build.properties"
|
|
|
|
configFile.withReader {
|
|
|
|
def prop = new Properties()
|
|
|
|
prop.load(it)
|
|
|
|
project.ext.config = new ConfigSlurper().parse prop
|
|
|
|
}
|
|
|
|
|
2017-01-05 00:09:10 +01:00
|
|
|
version=config.mod.version
|
|
|
|
group= "modtweaker" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
2015-10-07 16:36:04 +02:00
|
|
|
archivesBaseName = "ModTweaker2"
|
2015-01-11 20:59:45 +01:00
|
|
|
|
|
|
|
minecraft {
|
2016-07-09 22:30:50 +02:00
|
|
|
version = "${config.forge.version}"
|
2015-01-11 20:59:45 +01:00
|
|
|
runDir = "eclipse"
|
2015-12-09 05:05:50 +01:00
|
|
|
replace "@modVersion@", config.mod.version
|
2017-03-15 20:51:33 +01:00
|
|
|
mappings = "stable_29"
|
2015-01-11 20:59:45 +01:00
|
|
|
}
|
2016-09-17 01:43:26 +02:00
|
|
|
sourceCompatibility = targetCompatibility = "1.8" // Need this here so eclipse task generates correctly.
|
|
|
|
compileJava {
|
|
|
|
sourceCompatibility = targetCompatibility = "1.8"
|
|
|
|
}
|
2015-10-13 00:07:17 +02:00
|
|
|
repositories {
|
2016-10-27 21:30:30 +02:00
|
|
|
mavenLocal()
|
|
|
|
mavenCentral()
|
2015-10-13 00:07:17 +02:00
|
|
|
}
|
|
|
|
|
2016-10-27 21:30:30 +02:00
|
|
|
dependencies {
|
2016-07-09 22:30:50 +02:00
|
|
|
}
|
2015-10-13 00:07:17 +02:00
|
|
|
|
2015-01-11 20:59:45 +01:00
|
|
|
processResources
|
2017-01-05 00:09:10 +01:00
|
|
|
{
|
|
|
|
inputs.property "version", project.version
|
|
|
|
inputs.property "mcversion", config.minecraft.version
|
2016-02-27 13:21:27 +01:00
|
|
|
|
2017-01-05 00:09:10 +01:00
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
|
|
include 'mcmod.info'
|
|
|
|
|
|
|
|
expand 'version':project.version, 'mcversion':config.minecraft.version
|
|
|
|
}
|
2017-01-05 00:09:10 +01:00
|
|
|
|
2017-01-05 00:09:10 +01:00
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
|
|
exclude 'mcmod.info'
|
|
|
|
}
|
|
|
|
}
|
2015-01-24 01:42:07 +01:00
|
|
|
|
|
|
|
task deobfJar(type: Jar) {
|
|
|
|
from sourceSets.main.output
|
|
|
|
classifier = 'deobf'
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.build.dependsOn deobfJar
|