ModTweaker/build.gradle

74 lines
1.7 KiB
Groovy
Raw Normal View History

2016-07-09 22:30:50 +02:00
import groovy.io.FileType
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
ext.configFile = file "build.properties"
configFile.withReader {
def prop = new Properties()
prop.load(it)
project.ext.config = new ConfigSlurper().parse prop
}
version=config.minecraft.version + "-" + config.mod.version
2015-01-11 20:59:45 +01:00
group= "modtweaker" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
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"
replace "@modVersion@", config.mod.version
2016-07-09 22:30:50 +02:00
mappings = "snapshot_20160518"
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"
}
repositories {
2016-07-09 22:30:50 +02:00
}
2016-07-09 22:30:50 +02:00
dependencies {
def list = []
2016-07-09 22:30:50 +02:00
def dir = new File("libs/")
dir.eachFileRecurse (FileType.FILES) { file ->
list << file
// deobfCompile file.path
}
}
2015-01-11 20:59:45 +01:00
processResources
{
inputs.property "version", project.version
inputs.property "mcversion", config.minecraft.version
2015-01-11 20:59:45 +01:00
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version':project.version, 'mcversion':config.minecraft.version
2015-01-11 20:59:45 +01:00
}
2016-02-27 13:21:27 +01:00
2015-01-11 20:59:45 +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