Place the jrubyjar and prepareJrubyJar in the right group

Fixes #357
This commit is contained in:
R Tyler Croy 2019-05-25 11:42:53 -07:00
parent d5cc472535
commit 4298d69ae8
No known key found for this signature in database
GPG Key ID: E5C92681BEF6CEA2
2 changed files with 15 additions and 0 deletions

View File

@ -23,6 +23,8 @@ import org.gradle.api.tasks.StopExecutionException
import org.gradle.api.tasks.bundling.Jar
import org.gradle.api.tasks.bundling.ZipEntryCompression
import static com.github.jrubygradle.JRubyPlugin.TASK_GROUP_NAME
/**
* JRubyJar creates a Java Archive with Ruby code packed inside of it.
*
@ -247,7 +249,9 @@ class JRubyJar extends Jar {
appendix = 'jruby'
/* Make sure our default configuration is present regardless of whether we use it or not */
prepareTask = project.task("prepare${prepareNameForSuffix(name)}", type: JRubyPrepare)
prepareTask.group TASK_GROUP_NAME
dependsOn prepareTask
group TASK_GROUP_NAME
// TODO get rid of this and try to adjust the CopySpec for the gems
// to exclude '.jrubydir'

View File

@ -21,6 +21,17 @@ class JRubyJarSpec extends Specification {
}
}
@Issue('https://github.com/jruby-gradle/jruby-gradle-plugin/issues/357')
void 'group should be set to "JRuby"'() {
given:
JRubyJar task = project.task('spock-jar', type: JRubyJar)
def prepareTask = project.tasks.find { it.name == 'prepareSpock-jar' }
expect:
task.group == 'JRuby'
prepareTask.group == task.group
}
void "jrubyVersion should be configurable in a Gradle conventional way"() {
given:
final String version = '1.7.20'