Set some default groups and descriptions on our packaging/run tasks

Fixes #19
This commit is contained in:
R. Tyler Croy 2015-09-10 11:20:44 -07:00
parent ca083054b4
commit b8f6b9886e
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
4 changed files with 16 additions and 4 deletions

View File

@ -74,10 +74,11 @@ class JRubyStorm extends DefaultTask {
JRubyStorm() {
super()
configuration = project.configurations.maybeCreate(DEFAULT_CONFIGURATION_NAME)
this.group JRubyPlugin.TASK_GROUP_NAME
this.runTask = JRubyStormInternal.createRunTask(this.project, this)
this.assembleTask = JRubyStormInternal.createAssembleTask(this.project, this)
this.dependsOn assembleTask
runTask = JRubyStormInternal.createRunTask(this.project, this)
assembleTask = JRubyStormInternal.createAssembleTask(this.project, this)
dependsOn assembleTask
group JRubyPlugin.TASK_GROUP_NAME
project.afterEvaluate { this.updateDependencies() }
}

View File

@ -44,6 +44,7 @@ class JRubyStormLocal extends JavaExec implements JRubyExecTraits {
JRubyStormLocal() {
super()
super.setMain 'redstorm.TopologyLauncher'
description 'Execute the topology in "local" mode'
}
@Override

View File

@ -41,6 +41,7 @@ class JRubyStormJar extends JRubyJar {
JRubyStormJar() {
super()
appendix = ''
description 'Package a Storm topology jar'
project.afterEvaluate {
this.includeRedstorm()

View File

@ -142,6 +142,15 @@ class JRubyStormSpec extends Specification {
then:
project.configurations.findByName(JRubyStorm.DEFAULT_CONFIGURATION_NAME)
}
@Issue('https://github.com/jruby-gradle/jruby-gradle-storm-plugin/issues/19')
def "group should be set by default on the sub-tasks"() {
given:
JRubyStorm task = project.task('spock', type: JRubyStorm)
expect:
task.assembleTask.group == task.group
}
}
@Ignore("For some reason these are running with DEBUG log level and it won't turn off")