This repository was archived by the owner on May 19, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
src/main/groovy/com/github/jrubygradle/jar Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package com.github.jrubygradle.jar
3
3
import groovy.transform.PackageScope
4
4
import org.gradle.api.Project
5
5
import org.gradle.api.tasks.bundling.Jar
6
+ import com.github.jrubygradle.GemUtils
6
7
7
8
/* * Helper class to add extra methods to {@code Jar} tasks in order to add JRuby specifics.
8
9
*
@@ -39,21 +40,17 @@ class JRubyJarConfigurator {
39
40
40
41
/* * Adds a GEM installation directory
41
42
*/
42
- void gemDir (File f ) {
43
- gemDir(f. absolutePath)
43
+ void gemDir (def properties = [:], File f ) {
44
+ gemDir(properties, f. absolutePath)
44
45
}
45
46
46
47
/* * Adds a GEM installation directory
48
+ * @param Properties that affect how the GEM is packaged in the JAR. Currently only {@code fullGem} is
49
+ * supported. If set the full GEM content will be packed, otherwise only a subset will be packed.
47
50
* @param dir Source folder. Will be handled by {@code project.files(dir)}
48
51
*/
49
- void gemDir (Object dir ) {
50
- archive. with {
51
- from(dir) {
52
- include ' **'
53
- exclude ' cache/**'
54
- exclude ' gems/*/test/**'
55
- }
56
- }
52
+ void gemDir (def properties = [:],Object dir ) {
53
+ archive. with GemUtils . gemCopySpec(properties,archive. project,dir)
57
54
}
58
55
59
56
/* * Makes the JAR executable by setting a custom main class
You can’t perform that action at this time.
0 commit comments