Explicitly set the jruby-complete up for the compile configuration
Fixes #12
This commit is contained in:
parent
8299994e5a
commit
f3a5820612
|
@ -21,6 +21,7 @@ class JRubyJarPlugin implements Plugin<Project> {
|
|||
|
||||
project.apply plugin : 'com.github.jruby-gradle.base'
|
||||
project.apply plugin : 'java-base'
|
||||
project.configurations.maybeCreate('compile')
|
||||
project.configurations.maybeCreate('jrubyEmbeds')
|
||||
project.configurations.maybeCreate('jrubyJar')
|
||||
|
||||
|
@ -41,6 +42,14 @@ class JRubyJarPlugin implements Plugin<Project> {
|
|||
stubTask
|
||||
)
|
||||
|
||||
project.repositories {
|
||||
jcenter()
|
||||
}
|
||||
|
||||
project.dependencies {
|
||||
compile group: 'org.jruby', name: 'jruby-complete', version: project.jruby.defaultVersion
|
||||
}
|
||||
|
||||
project.configure(stubTask) {
|
||||
group JRubyPlugin.TASK_GROUP_NAME
|
||||
description 'Generates a JRuby Java bootstrap class'
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.github.jrubygradle.jar
|
||||
|
||||
import org.gradle.api.Task
|
||||
import org.gradle.api.artifacts.Dependency
|
||||
import org.gradle.api.file.FileCollection
|
||||
import org.gradle.api.tasks.bundling.Jar
|
||||
import org.gradle.api.tasks.compile.JavaCompile
|
||||
|
@ -96,6 +97,9 @@ class JRubyJarPluginSpec extends Specification {
|
|||
|
||||
then: "Then the attribute should be set to the default in the manifest"
|
||||
jarTask.manifest.attributes.'Main-Class' == JRubyJarConfigurator.DEFAULT_BOOTSTRAP_CLASS
|
||||
|
||||
and: "Then jruby-complete should be added as a dependency"
|
||||
project.configurations.getByName('compile').dependencies.matching { Dependency d -> d.name == 'jruby-complete' }
|
||||
}
|
||||
|
||||
def "Adding all defaults"() {
|
||||
|
|
Loading…
Reference in New Issue