Skip to content

Commit 05fb19d

Browse files
committed
Upgradle to 4.2 and use GradleTest 1.0-beta12
- Use Torquebox in addition to lasagne,io when building and to work around flasky tests. - Use Grolifant library to deal with Gradle compatibility issues. - Remove Gradle 5.0 deprecation warning. - Do not set logging level within tests. - Ignore IntelliJ "out" directories. - Update GradleTest fixtures for 1.0-betaX improvements. - Split out JRubyPluginInstanceSpec to its own file. - Extract JRubyJarTestKitSpec into its own test file. - Make test repository preparation a separate task. - Update TestKit syntax to deal with Gradle 4.2. - State that Gradle 2.8 is a minimum version. Also marked custom repository test as `PendingFeature` to be investigated later as doe a possible rewrite.
1 parent 62e7bf6 commit 05fb19d

File tree

30 files changed

+310
-397
lines changed

30 files changed

+310
-397
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ build/
55
*.iml
66
.idea
77
.awestruct/
8+
out/

build.gradle

Lines changed: 40 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ buildscript {
88
dependencies {
99
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.3.1'
1010
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:1.12.+'
11-
classpath 'org.ysb33r.gradle:gradletest:0.5.4'
11+
classpath 'org.ysb33r.gradle:gradletest:1.0-beta12'
1212
classpath "org.ajoberstar:gradle-git:1.2.0"
1313
}
1414
}
15+
1516
apply plugin: 'idea'
1617

1718
group = 'com.github.jruby-gradle'
18-
version = '1.5.1'
19+
version = '1.5.2-SNAPSHOT'
1920
defaultTasks 'check', 'assemble'
2021
sourceCompatibility = '1.8'
2122
targetCompatibility = '1.8'
@@ -25,60 +26,61 @@ if (!releaseBuild) {
2526
}
2627

2728
subprojects {
28-
apply plugin: 'groovy'
29-
apply plugin: 'codenarc'
29+
3030
apply plugin: 'idea'
3131
apply plugin: 'maven'
32-
apply plugin: 'com.jfrog.bintray'
33-
apply plugin: 'org.ysb33r.gradletest'
34-
apply plugin: 'provided-base'
3532

3633
repositories {
3734
jcenter()
35+
maven { url rubygemsProxy }
36+
maven { url torqueboxProxy }
3837
}
3938

40-
dependencies {
41-
compile new GradleDist(project, '2.0').asFileTree
39+
if(project.name != 'docs') {
40+
apply plugin: 'groovy'
41+
apply plugin: 'codenarc'
42+
apply plugin: 'com.jfrog.bintray'
43+
apply plugin: 'org.ysb33r.gradletest'
44+
apply plugin: 'provided-base'
4245

43-
codenarc(
44-
"org.codenarc:CodeNarc:0.24",
45-
"org.codehaus.groovy:groovy-all:2.4.0+"
46-
)
47-
}
46+
dependencies {
47+
// compile new GradleDist(project, '2.0').asFileTree
4848

49-
codenarc {
50-
sourceSets = [sourceSets.main]
51-
configFile = file("${rootProject.projectDir}/gradle/codenarc.rules")
52-
}
49+
compile localGroovy()
50+
compile gradleApi()
51+
compile 'org.ysb33r.gradle:grolifant:0.3'
5352

54-
test {
55-
testLogging {
56-
showStandardStreams = true
57-
exceptionFormat "full"
53+
codenarc(
54+
"org.codenarc:CodeNarc:0.24",
55+
"org.codehaus.groovy:groovy-all:2.4.0+"
56+
)
5857
}
59-
}
6058

61-
task sourcesJar(type: Jar, dependsOn: classes) {
62-
classifier = 'sources'
63-
from sourceSets.main.allSource
64-
}
65-
66-
plugins.withType(JavaPlugin) {
67-
sourceCompatibility = 1.8
68-
targetCompatibility = 1.8
59+
codenarc {
60+
sourceSets = [sourceSets.main]
61+
configFile = file("${rootProject.projectDir}/gradle/codenarc.rules")
62+
}
6963

64+
test {
65+
testLogging {
66+
showStandardStreams = true
67+
exceptionFormat "full"
68+
}
69+
}
7070

71-
project.tasks.withType(JavaCompile) { task ->
72-
task.sourceCompatibility = project.sourceCompatibility
73-
task.targetCompatibility = project.targetCompatibility
71+
task sourcesJar(type: Jar, dependsOn: classes) {
72+
classifier = 'sources'
73+
from sourceSets.main.allSource
7474
}
7575

76-
project.tasks.withType(GroovyCompile) { task ->
77-
task.sourceCompatibility = project.sourceCompatibility
78-
task.targetCompatibility = project.targetCompatibility
76+
gradleTest {
77+
versions '2.8', '2.14.1', '3.0', '3.5', '4.1'
78+
dependsOn jar
7979
}
80+
81+
install.dependsOn check
8082
}
81-
install.dependsOn check
83+
8284

8385
idea {
8486
module {

buildSrc/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

buildSrc/src/main/groovy/GradleDist.groovy

Lines changed: 0 additions & 44 deletions
This file was deleted.

docs/build.gradle

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ buildscript {
88
dependencies {
99
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
1010
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:1.12.+'
11-
classpath 'org.ysb33r.gradle:gradletest:0.5.3'
1211
classpath "org.ajoberstar:gradle-git:1.2.0"
1312

1413
/* wow. so recursion */
@@ -20,18 +19,6 @@ apply plugin: 'com.github.jruby-gradle.base'
2019

2120
import com.github.jrubygradle.JRubyExec
2221

23-
24-
/* We don't have a gradleTest to run in this sub-project, but I'd like to keep
25-
* the application of gradletest to all other subprojects in this build, so
26-
* we'll just remove it from ourselves
27-
*/
28-
tasks.removeAll(tasks.findByName('gradleTest'))
29-
30-
31-
repositories {
32-
maven { url rubygemsProxy }
33-
}
34-
3522
configurations {
3623
asciidoctor
3724
}
@@ -68,7 +55,7 @@ task compileAsciidoc(type: JRubyExec) {
6855
/* without the --force option, awestruct is not smart enough to regenerate
6956
* files based on includes */
7057
configuration 'asciidoctor'
71-
inputs.source fileTree(projectDir).include('**/*.adoc')
58+
inputs.files fileTree(projectDir).include('**/*.adoc')
7259
}
7360

7461
task assembleDocs {

docs/index.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ link:http://jruby.org[JRuby] with Gradle's excellent task and dependency
1010
management, *JRuby/Gradle* provides high quality build tooling for
1111
Ruby and Java developers alike.
1212

13+
NOTE: As from version 1.5.2 you will need at last Gradle 2.8.
14+
1315
*Plugins available:*
1416

1517
* link:base/[Base]

examples/run-ruby-binscript/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,7 @@
33
* documentation example. If you change this file, please be sure that it
44
* renders appropriately in the generated documentation
55
*/
6-
buildscript {
7-
repositories { jcenter() }
86

9-
dependencies {
10-
/* Replace "%%VERSION%%" with the version of JRuby/Gradle you wish to
11-
* use if you want to use this build.gradle outside of gradleTest
12-
*/
13-
classpath 'com.github.jruby-gradle:jruby-gradle-plugin:%%VERSION%%'
14-
}
15-
}
167
apply plugin: "com.github.jruby-gradle.base"
178

189
import com.github.jrubygradle.JRubyExec

examples/run-simple-ruby-script/build.gradle

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,6 @@
33
* documentation example. If you change this file, please be sure that it
44
* renders appropriately in the generated documentation
55
*/
6-
buildscript {
7-
repositories { jcenter() }
8-
9-
dependencies {
10-
/* Replace "%%VERSION%%" with the version of JRuby/Gradle you wish to
11-
* use if you want to use this build.gradle outside of gradleTest
12-
*/
13-
classpath 'com.github.jruby-gradle:jruby-gradle-plugin:%%VERSION%%'
14-
}
15-
}
166
apply plugin: "com.github.jruby-gradle.base"
177

188
import com.github.jrubygradle.JRubyExec

examples/self-executing-jar/build.gradle

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ buildscript {
1111
* GradleTest, this is NOT needed by end-users
1212
*/
1313
classpath 'com.github.jengelman.gradle.plugins:shadow:[1.2.2,2.0)'
14-
15-
/* Replace "%%VERSION%%" with the version of JRuby/Gradle you wish to
16-
* use if you want to use this build.gradle outside of gradleTest
17-
*/
18-
classpath 'com.github.jruby-gradle:jruby-gradle-plugin:%%VERSION%%'
19-
classpath 'com.github.jruby-gradle:jruby-gradle-jar-plugin:%%VERSION%%'
2014
}
2115
}
2216

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ sourceCompatibility=1.7
1111
jrubyVersion=9.1.12.0
1212
jettyVersion=9.2.12.v20150709
1313
rubygemsProxy=http://rubygems.lasagna.io/proxy/maven/releases
14+
torqueboxProxy=http://rubygems-proxy.torquebox.org/releases

0 commit comments

Comments
 (0)