70 lines
1.5 KiB
Groovy
70 lines
1.5 KiB
Groovy
import groovy.io.FileType
|
|
|
|
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'
|
|
|
|
ext.configFile = file "build.properties"
|
|
configFile.withReader {
|
|
def prop = new Properties()
|
|
prop.load(it)
|
|
project.ext.config = new ConfigSlurper().parse prop
|
|
}
|
|
|
|
version=config.mod.version
|
|
group= "modtweaker" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
|
archivesBaseName = "ModTweaker2"
|
|
|
|
minecraft {
|
|
version = "${config.forge.version}"
|
|
runDir = "eclipse"
|
|
replace "@modVersion@", config.mod.version
|
|
mappings = "snapshot_20160518"
|
|
}
|
|
|
|
repositories {
|
|
|
|
}
|
|
dependencies {
|
|
def list = []
|
|
|
|
def dir = new File("libs/")
|
|
dir.eachFileRecurse (FileType.FILES) { file ->
|
|
list << file
|
|
// deobfCompile file.path
|
|
}
|
|
}
|
|
|
|
processResources
|
|
{
|
|
inputs.property "version", project.version
|
|
inputs.property "mcversion", config.minecraft.version
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
include 'mcmod.info'
|
|
|
|
expand 'version':project.version, 'mcversion':config.minecraft.version
|
|
}
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
exclude 'mcmod.info'
|
|
}
|
|
}
|
|
|
|
task deobfJar(type: Jar) {
|
|
from sourceSets.main.output
|
|
classifier = 'deobf'
|
|
}
|
|
|
|
tasks.build.dependsOn deobfJar
|