Skip to content
This repository has been archived by the owner on May 19, 2019. It is now read-only.

Commit

Permalink
Merge pull request #9 from ysb33r/master
Browse files Browse the repository at this point in the history
FIXED #2: Fixed it so that 'java-base' instead of 'java' plugin is applied
  • Loading branch information
ysb33r committed Sep 25, 2014
2 parents a3e17d6 + a05ab85 commit 3963432
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ apply plugin: 'com.github.jrubygradle.jar'

This loads the following plugins if they are not already loaded:
+ `com.github.jrubygradle.base`
+ `java`
+ `java-base`

## Using the plugin

This plugin does not add any new tasks or extensions, extends the `Jar` task type with a `jruby` closure. If the `java` plugin
is loaded, then the `jar` task can also be configured.

```groovy
apply plugin: 'java'
jar {
jruby {
Expand Down Expand Up @@ -105,7 +107,7 @@ buildscript {
apply plugin: 'com.github.jrubygradle.jar'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java'
```

### Configuring Shadow JAR
Expand Down
10 changes: 3 additions & 7 deletions src/main/groovy/com/github/jrubygradle/jar/JRubyJarPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class JRubyJarPlugin implements Plugin<Project> {
void apply(Project project) {

project.apply plugin : 'com.github.jruby-gradle.base'
project.apply plugin : 'java'
project.apply plugin : 'java-base'
project.configurations.maybeCreate('jrubyEmbeds')
project.configurations.maybeCreate('jrubyJar')

Expand Down Expand Up @@ -57,12 +57,8 @@ class JRubyJarPlugin implements Plugin<Project> {

}

project.sourceSets {
main {
java {
srcDir new File(project.buildDir,'generated/java')
}
}
project.sourceSets.matching { it.name == "main" } .all {
it.java.srcDir new File(project.buildDir,'generated/java')
}
}
@PackageScope
Expand Down

0 comments on commit 3963432

Please sign in to comment.