Skip to content

Commit 92db049

Browse files
authored
Merge pull request #362 from rtyler/grouping-357
Place the jrubyjar and prepareJrubyJar in the right group
2 parents 9cacc16 + 4298d69 commit 92db049

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

jar-plugin/src/main/groovy/com/github/jrubygradle/jar/JRubyJar.groovy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ import org.gradle.api.tasks.StopExecutionException
2323
import org.gradle.api.tasks.bundling.Jar
2424
import org.gradle.api.tasks.bundling.ZipEntryCompression
2525

26+
import static com.github.jrubygradle.JRubyPlugin.TASK_GROUP_NAME
27+
2628
/**
2729
* JRubyJar creates a Java Archive with Ruby code packed inside of it.
2830
*
@@ -247,7 +249,9 @@ class JRubyJar extends Jar {
247249
appendix = 'jruby'
248250
/* Make sure our default configuration is present regardless of whether we use it or not */
249251
prepareTask = project.task("prepare${prepareNameForSuffix(name)}", type: JRubyPrepare)
252+
prepareTask.group TASK_GROUP_NAME
250253
dependsOn prepareTask
254+
group TASK_GROUP_NAME
251255

252256
// TODO get rid of this and try to adjust the CopySpec for the gems
253257
// to exclude '.jrubydir'

jar-plugin/src/test/groovy/com/github/jrubygradle/jar/JRubyJarSpec.groovy

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ class JRubyJarSpec extends Specification {
2121
}
2222
}
2323

24+
@Issue('https://github.com/jruby-gradle/jruby-gradle-plugin/issues/357')
25+
void 'group should be set to "JRuby"'() {
26+
given:
27+
JRubyJar task = project.task('spock-jar', type: JRubyJar)
28+
def prepareTask = project.tasks.find { it.name == 'prepareSpock-jar' }
29+
30+
expect:
31+
task.group == 'JRuby'
32+
prepareTask.group == task.group
33+
}
34+
2435
void "jrubyVersion should be configurable in a Gradle conventional way"() {
2536
given:
2637
final String version = '1.7.20'

0 commit comments

Comments
 (0)