Skip to content

Commit 689999d

Browse files
author
R. Tyler Croy
committed
Merge pull request #261 from mkristian/fixes
Fixes
2 parents 12403e4 + b81b4f9 commit 689999d

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ class JRubyJar extends Jar {
100100
* @return configured 'Main-Class' attribute for the JRubyJar
101101
*/
102102
@Input
103+
@Optional
103104
String getMainClass() {
104105
return jarMainClass
105106
}

jruby-gradle-jar-plugin/src/main/groovy/com/github/jrubygradle/jar/internal/JRubyDirInfo.groovy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import org.gradle.api.file.RelativePath
1111
class JRubyDirInfo {
1212
private static final String NEW_LINE = System.getProperty('line.separator')
1313
private static final File OMIT = new File('')
14-
private static final List<String> OMISSION_DIRS = ['META-INF', 'gems', 'specifications',
15-
'build_info', 'cache', 'doc', 'bin']
14+
private static final List<String> OMISSION_DIRS = ['META-INF', 'bin', 'jars']
1615

1716
private final Map dirsCache = [:]
1817

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,19 @@ class JRubyJarSpec extends Specification {
103103
then:
104104
task.configuration == customConfig.name
105105
}
106+
107+
def "configure library()"() {
108+
given: 'a task with initScript library()'
109+
boolean evaluated = false
110+
JRubyJar task = project.task('library-jar', type: JRubyJar)
111+
112+
when:
113+
task.configure {
114+
evaluated = true
115+
initScript library()
116+
}
117+
118+
then:
119+
evaluated
120+
}
106121
}

0 commit comments

Comments
 (0)