Skip to content

Commit 942a1b6

Browse files
authored
Merge pull request #1 from jruby-gradle/master
updates
2 parents 190de1b + 2c786b1 commit 942a1b6

File tree

9 files changed

+50
-11
lines changed

9 files changed

+50
-11
lines changed

Jenkinsfile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env groovy
2+
3+
node('docker') {
4+
stage 'Checkout source'
5+
checkout scm
6+
7+
stage 'Build and test'
8+
List<String> javas = ['7', '8']
9+
List<String> plugins = ['base', 'war', 'jar']
10+
Map parallelSteps = [:]
11+
12+
for (int j = 0; j < javas.size(); j++) {
13+
for (int i = 0; i < plugins.size(); i++) {
14+
def javaVersion = "${javas.get(j)}-jdk"
15+
def plugin = "jruby-gradle-${plugins.get(i)}-plugin"
16+
parallelSteps["${javaVersion}-${plugin}"] = {
17+
node('docker') {
18+
checkout scm
19+
try {
20+
docker.image("openjdk:${javaVersion}").inside {
21+
timeout(45) {
22+
sh "./gradlew -Si ${plugin}:check ${plugin}:gradleTest ${plugin}:assemble"
23+
}
24+
}
25+
}
26+
finally {
27+
junit '**/build/test-results/**/*.xml'
28+
archiveArtifacts artifacts: '**/build/libs/*.jar,build/*.zip', fingerprint: true
29+
}
30+
}
31+
}
32+
}
33+
}
34+
parallel(parallelSteps)
35+
}

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ buildscript {
1515
apply plugin: 'idea'
1616

1717
group = 'com.github.jruby-gradle'
18-
version = '1.2.1'
18+
version = '1.3.3'
1919
defaultTasks 'check', 'assemble'
2020

2121
if (!releaseBuild) {

docs/index.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ execute a Ruby script, which has Ruby-based dependencies:
2727
.build.gradle (link:https://github.com/jruby-gradle/jruby-gradle-plugin/blob/master/examples/run-simple-ruby-script/build.gradle[full source])
2828
[source, gradle]
2929
----
30-
include::../examples/run-simple-ruby-script/build.gradle[lines=16..30]
30+
include::../examples/run-simple-ruby-script/build.gradle[lines=6..30]
3131
----
3232

3333
.print-script.rb (link:https://github.com/jruby-gradle/jruby-gradle-plugin/blob/master/examples/run-simple-ruby-script/print-script[full source])
@@ -47,7 +47,7 @@ image::images/print-script-output.png[]
4747
.build.gradle (link:https://github.com/jruby-gradle/jruby-gradle-plugin/blob/master/examples/self-executing-jar/build.gradle[full source])
4848
[source, gradle]
4949
----
50-
include::../examples/self-executing-jar/build.gradle[lines=17..33]
50+
include::../examples/self-executing-jar/build.gradle[lines=6..40]
5151
----
5252

5353
.entrypoint.rb (link:https://github.com/jruby-gradle/jruby-gradle-plugin/blob/master/examples/self-executing-jar/entrypoint.rb[full source])

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ releaseBuild=false
88

99
targetCompatibility=1.7
1010
sourceCompatibility=1.7
11-
jrubyVersion=9.1.2.0
11+
jrubyVersion=9.1.4.0
1212
jettyVersion=9.2.12.v20150709
1313
rubygemsProxy=http://rubygems.lasagna.io/proxy/maven/releases

jruby-gradle-base-plugin/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ dependencies {
6565

6666
// NOTE: Leave this at .11 as it must be an older version. if
6767
// you change it here you will also need to update JRubyExecIntegrationSpec
68-
integrationTestGems "org.jruby:jruby-complete:1.7.11"
68+
integrationTestGems "org.jruby:jruby-complete:1.7.19"
6969

7070
// NOTE: older jruby versions needs this for exec to work properly
7171
integrationTestGems "rubygems:jar-dependencies:0.1.15"

jruby-gradle-base-plugin/src/integTest/groovy/com/github/jrubygradle/JRubyExecExtensionIntegrationSpec.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ class JRubyExecExtensionIntegrationSpec extends Specification {
9393
}
9494

9595
then:
96-
outputBuffer == "[\"${new File(TEST_JARS_DIR, 'org/bouncycastle/bcprov-jdk15on/1.46/bcprov-jdk15on-1.46.jar').toURL()}\"]"
96+
def outputFile = new File(TEST_JARS_DIR, 'org/bouncycastle/bcprov-jdk15on/1.46/bcprov-jdk15on-1.46.jar')
97+
outputBuffer == "[\"${outputFile.toURI().toURL()}\"]"
9798
}
9899

99100
def "Running a script that requires a gem, a separate jRuby and a separate configuration"() {

jruby-gradle-base-plugin/src/integTest/groovy/com/github/jrubygradle/JRubyExecIntegrationSpec.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class JRubyExecIntegrationSpec extends Specification {
4444
given: "Version is set on the task"
4545
Configuration config
4646
final String configName = 'integ-exec-config'
47-
final String newVersion = '1.7.11'
47+
final String newVersion = '1.7.19'
4848
Pattern pattern = Pattern.compile(/.*(jruby-complete-.+.jar)/)
4949

5050
when:
@@ -160,7 +160,7 @@ class JRubyExecIntegrationSpec extends Specification {
160160

161161
def "Running a script that requires a gem, a separate JRuby and a separate configuration"() {
162162
given:
163-
final String newVersion = '1.7.11'
163+
final String newVersion = '1.7.19'
164164
assert project.jruby.execVersion != newVersion
165165
project.with {
166166
configurations.create('RubyWax')
@@ -191,7 +191,7 @@ class JRubyExecIntegrationSpec extends Specification {
191191
* least one version of JRuby installed
192192
*/
193193
jruby {
194-
execVersion '1.7.11'
194+
execVersion '1.7.19'
195195
defaultRepositories false
196196
}
197197

jruby-gradle-base-plugin/src/main/groovy/com/github/jrubygradle/GemUtils.groovy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ class GemUtils {
9595
// jbundler and/or jar-dependencies will not attempt to invoke
9696
// Maven on a gem's behalf to install a Java dependency that we
9797
// should already have taken care of, see #79
98-
setEnvironment 'JBUNDLE_SKIP' : true, 'JARS_SKIP' : true
98+
environment JBUNDLE_SKIP : true,
99+
JARS_SKIP : true,
100+
GEM_HOME : destDir.absolutePath,
101+
GEM_PATH : destDir.absolutePath
99102
main JRUBY_MAINCLASS
100103
classpath jRubyClasspath
101104
args '-S', GEM, 'install'

jruby-gradle-base-plugin/src/main/groovy/com/github/jrubygradle/JRubyPluginExtension.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import org.gradle.api.Project
77
* Class providing the jruby{} DSL extension to the Gradle build script
88
*/
99
class JRubyPluginExtension {
10-
static final String DEFAULT_JRUBY_VERSION = '9.1.2.0'
10+
static final String DEFAULT_JRUBY_VERSION = '9.1.4.0'
1111

1212
/** The default version of jruby that will be used */
1313
String defaultVersion = DEFAULT_JRUBY_VERSION

0 commit comments

Comments
 (0)