Executing the jrubyStorm task should also execute its assemble task
Fixes #14
This commit is contained in:
parent
2934164708
commit
2046c89c29
|
@ -3,6 +3,7 @@ package com.github.jrubygradle.storm
|
|||
import com.github.jrubygradle.JRubyPlugin
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.Incubating
|
||||
import org.gradle.api.Task
|
||||
import org.gradle.api.artifacts.Configuration
|
||||
import org.gradle.api.file.CopySpec
|
||||
|
@ -29,6 +30,12 @@ class JRubyStorm extends DefaultTask {
|
|||
/** Configuration which has all of our dependencies */
|
||||
protected Configuration configuration
|
||||
|
||||
/** Grab the {@code org.gradle.api.tasks.bundling.AbstractArchiveTask} that this depends on to build the jar */
|
||||
@Incubating
|
||||
Task getAssembleTask() {
|
||||
return assembleTask
|
||||
}
|
||||
|
||||
/** Path (absolute or relative) to the Ruby file containing the topology */
|
||||
@Input
|
||||
String topology
|
||||
|
@ -81,6 +88,7 @@ class JRubyStorm extends DefaultTask {
|
|||
this.group JRubyPlugin.TASK_GROUP_NAME
|
||||
this.runTask = JRubyStormInternal.createRunTask(this.project, this)
|
||||
this.assembleTask = JRubyStormInternal.createAssembleTask(this.project, this)
|
||||
this.dependsOn assembleTask
|
||||
|
||||
project.afterEvaluate { this.updateDependencies() }
|
||||
}
|
||||
|
|
|
@ -61,6 +61,14 @@ class JRubyStormSpec extends Specification {
|
|||
runTask.topology == 'spock.rb'
|
||||
}
|
||||
|
||||
def "JRubyStorm task should depend on its assembleTask"() {
|
||||
given:
|
||||
Task task = project.task('spock', type: JRubyStorm)
|
||||
|
||||
expect:
|
||||
task.dependsOn.find { it == task.assembleTask }
|
||||
}
|
||||
|
||||
def "getStormVersion() should return the storm.defaultStormVersion by default"() {
|
||||
given:
|
||||
JRubyStorm task = project.task('spock', type: JRubyStorm)
|
||||
|
|
Loading…
Reference in New Issue