File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
src/main/groovy/com/github/jrubygradle Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,34 @@ in the ```jrubyexec``` closure will cause a failure
133
133
As with ` JRubyExec ` , ` args ` , ` setArgs ` and ` main ` are illegal within the ` jrubyexec ` closure.
134
134
All other methods should work.
135
135
136
+ ### Running a Ruby PATH command
137
+
138
+ Because ` JRubyExec ` checks for the existence of the script, it might look at first whether running Ruby commands from
139
+ ` PATH ` could be difficult. However, this is totally possible by utilising ` jrubyArgs ` . Here is an example of running
140
+ ` rake ` as task.
141
+
142
+ ``` groovy
143
+ task rake( type :JRubyExec ) {
144
+ jrubyArgs '-S', 'rake'
145
+ script '/path/to/Rakefile'
146
+ scriptArgs 'target1', 'target2'
147
+ }
148
+ ```
149
+
150
+ or even
151
+
152
+ ``` groovy
153
+ ext {
154
+ rake = { String target ->
155
+ jrubyexec {
156
+ jrubyArgs '-S', 'rake'
157
+ script '/path/to/Rakefile'
158
+ scriptArgs target
159
+ }
160
+ }
161
+ }
162
+ ```
163
+
136
164
## JRubyPrepareGems - A task for unpacking GEMs
137
165
138
166
Unpacking occurs using the default ` jruby ` version as set by ` jruby.execVersion ` .
Original file line number Diff line number Diff line change @@ -150,6 +150,7 @@ class GemUtils {
150
150
if (! fullGem) {
151
151
exclude ' cache/**'
152
152
exclude ' gems/*/test/**'
153
+ exclude ' gems/*/tests/**'
153
154
exclude ' build_info'
154
155
}
155
156
}
You can’t perform that action at this time.
0 commit comments