Skip to content

Commit 28a28af

Browse files
authored
Merge pull request #309 from ysb33r/gradle42
Upgradle to 4.2 and use GradleTest 1.0-beta12
2 parents 62e7bf6 + 28b7b38 commit 28a28af

File tree

31 files changed

+310
-402
lines changed

31 files changed

+310
-402
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/

.travis.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,17 @@ addons:
55
packages:
66
- oracle-java8-installer
77

8-
install:
9-
- ./gradlew clean
8+
install: true
109

1110
script:
12-
- ./gradlew -S -i check gradleTest assemble
11+
- ./gradlew -S -i --console=plain --no-daemon clean build
1312

1413
jdk:
1514
- oraclejdk8
1615

1716
os:
1817
- linux
1918

20-
env: TERM=dumb
21-
2219
cache:
2320
directories:
2421
- $HOME/.gradle

build.gradle

Lines changed: 39 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.6.0-SNAPSHOT'
1920
defaultTasks 'check', 'assemble'
2021
sourceCompatibility = '1.8'
2122
targetCompatibility = '1.8'
@@ -25,60 +26,60 @@ 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 {
4847

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

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

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
58+
codenarc {
59+
sourceSets = [sourceSets.main]
60+
configFile = file("${rootProject.projectDir}/gradle/codenarc.rules")
61+
}
6962

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

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

76-
project.tasks.withType(GroovyCompile) { task ->
77-
task.sourceCompatibility = project.sourceCompatibility
78-
task.targetCompatibility = project.targetCompatibility
75+
gradleTest {
76+
versions '2.8', '2.14.1', '3.0', '3.5', '4.1'
77+
dependsOn jar
7978
}
79+
80+
install.dependsOn check
8081
}
81-
install.dependsOn check
82+
8283

8384
idea {
8485
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.6.0 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

0 commit comments

Comments
 (0)