diff options
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/build.gradle b/build.gradle index 959085a956..8e844c28af 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,7 @@ buildscript { classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' } } - +apply plugin: 'java' apply plugin: 'forge' //apply plugin: 'idea' @@ -103,7 +103,33 @@ dependencies { // provided name: 'Railcraft', version: config.railcraft.version, ext: 'jar' // provided name: 'IC2NuclearControl', version: config.nc.version, ext: 'jar' } +task devJar(type: Jar) { + from sourceSets.main.output + classifier = 'dev' +} +task generateDebugJar(type: Copy) { + from sourceSets.main.allSource + into "$buildDir/debugjarsrc/java" + filter { line -> line.replaceAll('@false', '@true') } +} +task compileDebugJar(type: JavaCompile, dependsOn: generateDebugJar){ + source = file("$buildDir/debugjarsrc") + classpath = sourceSets.main.compileClasspath + destinationDir = file("$buildDir/debugjarCompiled") +} +task copyResources(type: Copy,dependsOn: compileDebugJar){ + from sourceSets.main.resources + into "$buildDir/debugjarCompiled" +} +task debugJar(type: Jar, dependsOn: copyResources) { + from "$buildDir/debugjarCompiled" + classifier = 'dev-debug' +} +artifacts { + archives devJar + archives debugJar +} processResources { // this will ensure that this task is redone when the versions change. |