Skip to content

Commit

Permalink
Only add executable jars to compile classPath
Browse files Browse the repository at this point in the history
  • Loading branch information
Mumfrey committed May 18, 2015
1 parent a0b01d3 commit 02ddcf6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,16 @@ dependencies {
compile 'com.googlecode.jarjar:jarjar:1.1'
}

// Filter non-source jars from specified task's outputs
FileCollection executables(TaskOutputs outputs) {
files((outputs.files.findAll{!it.name.contains("sources")}).collect{lib -> file(lib)})
}

// Task to read ASM library and rename packages
task renamedASM {
outputs.file files(configurations.asm.files.collect { file ->
new File(project.repositories['renamed-packages'].dirs[0], "mixin-" + file.name).path
})
ext.jars = files((outputs.files.findAll{!it.name.contains("sources")}).collect{lib -> file(lib)})
doLast {
ant {
taskdef (
Expand Down Expand Up @@ -153,8 +157,8 @@ dependencies {
apCompile 'net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT'

// remapped ASM
compile tasks.renamedASM.outputs.files
apCompile tasks.renamedASM.outputs.files
compile executables(tasks.renamedASM.outputs)
apCompile executables(tasks.renamedASM.outputs)
}

// Filter, process, and include resources
Expand Down

0 comments on commit 02ddcf6

Please sign in to comment.