Remove the jrubyCacheJars and jrubyCleanJars tasks which are no longer relevant

This commit is contained in:
R. Tyler Croy 2014-11-24 11:18:01 -08:00
parent 208fc93a8b
commit b1cf5b0c9e
2 changed files with 0 additions and 48 deletions

View File

@ -33,27 +33,5 @@ class JRubyWarPlugin implements Plugin<Project> {
dependsOn project.tasks.jrubyPrepare
classpath project.configurations.jrubyWar
}
// TODO: jarcache should rather be inside buildDir
project.task('jrubyCacheJars', type: Copy) {
group JRubyPlugin.TASK_GROUP_NAME
description 'Cache .jar-based dependencies into .jarcache/'
from project.configurations.jrubyWar
into ".jarcache"
include '**/*.jar'
}
// Add our dependency onto jrubyPrepare so it will serve our needs too
project.tasks.jrubyPrepare.dependsOn project.tasks.jrubyCacheJars
project.task('jrubyCleanJars', type: Delete) {
group JRubyPlugin.TASK_GROUP_NAME
description 'Clean up the temporary dirs created by the jrubyCacheJars task'
delete '.jarcache/'
}
// Add our dependency onto clean so it will clean up after us too
project.tasks.clean.dependsOn project.tasks.jrubyCleanJars
}
}

View File

@ -29,31 +29,5 @@ class JRubyWarPluginSpec extends Specification {
expect:
project.tasks.jrubyWar.group == 'JRuby'
project.tasks.jrubyWar instanceof War
project.tasks.jrubyCacheJars instanceof Copy
project.tasks.jrubyCleanJars instanceof Delete
}
def "jrubyPrepare should depend on jrubyCacheJars"() {
expect:
assertTrue(taskContainsDependency(project.tasks.jrubyPrepare,
'jrubyCacheJars'))
}
def 'clean should depend on jrubyCleanJars'() {
expect:
assertTrue(taskContainsDependency(project.tasks.clean, 'jrubyCleanJars'))
}
private Boolean taskContainsDependency(Task task, String taskName) {
Boolean status = false
task.taskDependencies.values.each {
if (it instanceof Task) {
if (taskName == it.name) {
status = true
}
}
}
return status
}
}