Skip to content

Commit 3684c40

Browse files
committed
Fix nagging issues preventing a release
- Upgradle to 4.8.1. - Remove lasagne GEMS proxy. - Remove `buildscript`, replace with `plugins`. - Source/target compatibility set to JDK8. - Upgradle to Grolifant 0.8. - Upgradle to Spock 1.1. - Added Gradle 4.9 to compatibility test set. - Remove deprecated CodeNarc rules. i
1 parent 4352f46 commit 3684c40

File tree

20 files changed

+108
-123
lines changed

20 files changed

+108
-123
lines changed

appveyor.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ branches:
1616

1717
environment:
1818
matrix:
19-
- JAVA_HOME: C:\Program Files\Java\jdk1.7.0
2019
- JAVA_HOME: C:\Program Files\Java\jdk1.8.0
21-
- JAVA_HOME: C:\Program Files (x86)\Java\jdk1.7.0
2220
- JAVA_HOME: C:\Program Files (x86)\Java\jdk1.8.0
2321

2422

build.gradle

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
1-
buildscript {
2-
repositories {
3-
jcenter()
4-
maven {
5-
url "https://plugins.gradle.org/m2/"
6-
}
7-
}
8-
dependencies {
9-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.3.1'
10-
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:1.12.+'
11-
classpath 'org.ysb33r.gradle:gradletest:1.0-beta12'
12-
classpath "org.ajoberstar:gradle-git:1.2.0"
13-
}
1+
plugins {
2+
id 'org.ysb33r.gradletest' version '2.0-alpha-8' apply false
3+
id 'com.jfrog.bintray' version '1.3.1' apply false
4+
id 'org.ajoberstar.github-pages' version '1.2.0' apply false
145
}
156

16-
apply plugin: 'idea'
177

18-
group = 'com.github.jruby-gradle'
19-
version = '1.6.0'
20-
defaultTasks 'check', 'assemble'
21-
sourceCompatibility = '1.8'
22-
targetCompatibility = '1.8'
238

24-
if (!releaseBuild) {
25-
version = "${version}-SNAPSHOT"
9+
allprojects {
10+
apply plugin: 'idea'
11+
12+
group = 'com.github.jruby-gradle'
13+
version = '1.6.0'
14+
15+
if (!releaseBuild) {
16+
version = "${version}-SNAPSHOT"
17+
}
18+
19+
defaultTasks 'check', 'assemble'
20+
sourceCompatibility = '1.8'
21+
targetCompatibility = '1.8'
22+
23+
ext {
24+
spockVersion = "org.spockframework:spock-core:1.1-groovy-2.4"
25+
}
26+
2627
}
2728

29+
2830
subprojects {
2931

30-
apply plugin: 'idea'
3132
apply plugin: 'maven'
3233

3334
repositories {
@@ -41,18 +42,13 @@ subprojects {
4142
apply plugin: 'codenarc'
4243
apply plugin: 'com.jfrog.bintray'
4344
apply plugin: 'org.ysb33r.gradletest'
44-
apply plugin: 'provided-base'
4545

46-
dependencies {
4746

47+
dependencies {
4848
compile localGroovy()
4949
compile gradleApi()
50-
compile 'org.ysb33r.gradle:grolifant:0.3'
51-
52-
codenarc(
53-
"org.codenarc:CodeNarc:0.24",
54-
"org.codehaus.groovy:groovy-all:2.4.0+"
55-
)
50+
compile 'org.ysb33r.gradle:grolifant:0.8'
51+
gradleTestRuntime 'org.ysb33r.gradle:grolifant:0.8'
5652
}
5753

5854
codenarc {
@@ -73,7 +69,7 @@ subprojects {
7369
}
7470

7571
gradleTest {
76-
versions '2.8', '2.14.1', '3.0', '3.5', '4.1'
72+
versions '3.0', '3.5', '4.1', '4.7', '4.9'
7773
dependsOn jar
7874
}
7975

docs/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ buildscript {
66
}
77
}
88
dependencies {
9-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
10-
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:1.12.+'
11-
classpath "org.ajoberstar:gradle-git:1.2.0"
9+
// classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
10+
// classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:1.12.+'
11+
// classpath "org.ajoberstar:gradle-git:1.2.0"
1212

1313
/* wow. so recursion */
1414
classpath "com.github.jruby-gradle:jruby-gradle-plugin:1.0.3"

gradle/codenarc.rules

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ ruleset {
44
bug free :)
55
'''
66

7-
AbcComplexity // DEPRECATED: Use the AbcMetric rule instead. Requires the GMetrics jar
87
AbcMetric // Requires the GMetrics jar
98
AbstractClassName
109
AbstractClassWithPublicConstructor
@@ -136,17 +135,6 @@ ruleset {
136135
GStringAsMapKey
137136
GStringExpressionWithinString
138137
GetterMethodCouldBeProperty
139-
GrailsDomainHasEquals
140-
GrailsDomainHasToString
141-
GrailsDomainReservedSqlKeywordName
142-
GrailsDomainWithServiceReference
143-
GrailsDuplicateConstraint
144-
GrailsDuplicateMapping
145-
GrailsMassAssignment
146-
GrailsPublicControllerMethod
147-
GrailsServletContextReference
148-
GrailsSessionReference // DEPRECATED
149-
GrailsStatelessService
150138
GroovyLangImmutable
151139
HardCodedWindowsFileSeparator
152140
HardCodedWindowsRootDirectory

gradle/wrapper/gradle-wrapper.jar

1.07 KB
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Wed Sep 27 12:34:41 CEST 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-bin.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip

gradlew

Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,43 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
22

33
##############################################################################
44
##
55
## Gradle start up script for UN*X
66
##
77
##############################################################################
88

9-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10-
DEFAULT_JVM_OPTS=""
9+
# Attempt to set APP_HOME
10+
# Resolve links: $0 may be a link
11+
PRG="$0"
12+
# Need this for relative symlinks.
13+
while [ -h "$PRG" ] ; do
14+
ls=`ls -ld "$PRG"`
15+
link=`expr "$ls" : '.*-> \(.*\)$'`
16+
if expr "$link" : '/.*' > /dev/null; then
17+
PRG="$link"
18+
else
19+
PRG=`dirname "$PRG"`"/$link"
20+
fi
21+
done
22+
SAVED="`pwd`"
23+
cd "`dirname \"$PRG\"`/" >/dev/null
24+
APP_HOME="`pwd -P`"
25+
cd "$SAVED" >/dev/null
1126

1227
APP_NAME="Gradle"
1328
APP_BASE_NAME=`basename "$0"`
1429

30+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31+
DEFAULT_JVM_OPTS=""
32+
1533
# Use the maximum available, or set MAX_FD != -1 to use that value.
1634
MAX_FD="maximum"
1735

18-
warn ( ) {
36+
warn () {
1937
echo "$*"
2038
}
2139

22-
die ( ) {
40+
die () {
2341
echo
2442
echo "$*"
2543
echo
@@ -30,6 +48,7 @@ die ( ) {
3048
cygwin=false
3149
msys=false
3250
darwin=false
51+
nonstop=false
3352
case "`uname`" in
3453
CYGWIN* )
3554
cygwin=true
@@ -40,31 +59,11 @@ case "`uname`" in
4059
MINGW* )
4160
msys=true
4261
;;
62+
NONSTOP* )
63+
nonstop=true
64+
;;
4365
esac
4466

45-
# For Cygwin, ensure paths are in UNIX format before anything is touched.
46-
if $cygwin ; then
47-
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48-
fi
49-
50-
# Attempt to set APP_HOME
51-
# Resolve links: $0 may be a link
52-
PRG="$0"
53-
# Need this for relative symlinks.
54-
while [ -h "$PRG" ] ; do
55-
ls=`ls -ld "$PRG"`
56-
link=`expr "$ls" : '.*-> \(.*\)$'`
57-
if expr "$link" : '/.*' > /dev/null; then
58-
PRG="$link"
59-
else
60-
PRG=`dirname "$PRG"`"/$link"
61-
fi
62-
done
63-
SAVED="`pwd`"
64-
cd "`dirname \"$PRG\"`/" >&-
65-
APP_HOME="`pwd -P`"
66-
cd "$SAVED" >&-
67-
6867
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
6968

7069
# Determine the Java command to use to start the JVM.
@@ -90,7 +89,7 @@ location of your Java installation."
9089
fi
9190

9291
# Increase the maximum file descriptors if we can.
93-
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
92+
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
9493
MAX_FD_LIMIT=`ulimit -H -n`
9594
if [ $? -eq 0 ] ; then
9695
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -114,6 +113,7 @@ fi
114113
if $cygwin ; then
115114
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116115
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116+
JAVACMD=`cygpath --unix "$JAVACMD"`
117117

118118
# We build the pattern for arguments to be converted via cygpath
119119
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
@@ -154,11 +154,19 @@ if $cygwin ; then
154154
esac
155155
fi
156156

157-
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158-
function splitJvmOpts() {
159-
JVM_OPTS=("$@")
157+
# Escape application args
158+
save () {
159+
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160+
echo " "
160161
}
161-
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162-
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
162+
APP_ARGS=$(save "$@")
163+
164+
# Collect all arguments for the java command, following the shell quoting and substitution rules
165+
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166+
167+
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168+
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169+
cd "$(dirname "$0")"
170+
fi
163171

164-
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
172+
exec "$JAVACMD" "$@"

gradlew.bat

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
@rem Set local scope for the variables with windows NT shell
99
if "%OS%"=="Windows_NT" setlocal
1010

11-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12-
set DEFAULT_JVM_OPTS=
13-
1411
set DIRNAME=%~dp0
1512
if "%DIRNAME%" == "" set DIRNAME=.
1613
set APP_BASE_NAME=%~n0
1714
set APP_HOME=%DIRNAME%
1815

16+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17+
set DEFAULT_JVM_OPTS=
18+
1919
@rem Find java.exe
2020
if defined JAVA_HOME goto findJavaFromJavaHome
2121

@@ -46,10 +46,9 @@ echo location of your Java installation.
4646
goto fail
4747

4848
:init
49-
@rem Get command-line arguments, handling Windowz variants
49+
@rem Get command-line arguments, handling Windows variants
5050

5151
if not "%OS%" == "Windows_NT" goto win9xME_args
52-
if "%@eval[2+2]" == "4" goto 4NT_args
5352

5453
:win9xME_args
5554
@rem Slurp the command line arguments.
@@ -60,11 +59,6 @@ set _SKIP=2
6059
if "x%~1" == "x" goto execute
6160

6261
set CMD_LINE_ARGS=%*
63-
goto execute
64-
65-
:4NT_args
66-
@rem Get arguments from the 4NT Shell from JP Software
67-
set CMD_LINE_ARGS=%$
6862

6963
:execute
7064
@rem Setup the command line

jruby-gradle-base-plugin/build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
group = rootProject.group
2-
version = rootProject.version
31
archivesBaseName = 'jruby-gradle-plugin'
42
apply from: "${rootProject.projectDir}/gradle/integration-tests.gradle"
53

@@ -35,8 +33,6 @@ dependencies {
3533
exclude group: 'org.sonatype.nexus.plugins', module: 'nexus-ruby-tools'
3634
}
3735

38-
String spockVersion = "org.spockframework:spock-core:1.1-groovy-2.4"
39-
4036
testJRubyPrepare "org.jruby:jruby-complete:${jrubyVersion}"
4137

4238
testCompile (spockVersion) {
@@ -69,7 +65,7 @@ dependencies {
6965
// NOTE: If you change this, you will also need to update JRubyExecExtensionIntegrationSpec
7066
integrationTestGems 'org.bouncycastle:bcprov-jdk15on:1.46'
7167

72-
gradleTest "org.jruby:jruby-complete:${jrubyVersion}"
68+
gradleTest"org.jruby:jruby-complete:${jrubyVersion}"
7369
gradleTest 'rubygems:credit_card_validator:1.1.0'
7470
gradleTest 'org.bouncycastle:bcprov-jdk15on:1.50'
7571
}

jruby-gradle-base-plugin/src/gradleTest/jrubyExec/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jruby {
1111
}
1212

1313
task requiresGems( type : JRubyExec ) {
14-
script "scripts/requiresGem.rb"
14+
script 'scripts/requiresGem.rb'
1515
}
1616

1717
task runGradleTest {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ class JRubyExecIntegrationSpec extends Specification {
134134
outputBuffer =~ /loaded 'a' gem with version ${version}/
135135
}
136136

137+
@Ignore
137138
def "Running a script that requires a gem using custom embedded rubygems-servlets maven repo"() {
138139
given:
139140
String version = '0.1.0'
@@ -143,8 +144,8 @@ class JRubyExecIntegrationSpec extends Specification {
143144
standardOutput output
144145
}
145146
project.repositories {
146-
rubygems('http://rubygems.lasagna.io/proxy')
147147
rubygems('http://rubygems-proxy.torquebox.org')
148+
rubygems('http://rubygems.lasagna.io/proxy')
148149
}
149150
project.dependencies {
150151
jrubyExec "rubygems:a:${version}"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class JRubyPlugin implements Plugin<Project> {
1414
static final String TASK_GROUP_NAME = 'JRuby'
1515
static final String RUBYGEMS_ORG_URL = 'https://rubygems.org'
1616
static final String TORQUEBOX_RUBYGEMS_RELEASE_URL = 'http://rubygems-proxy.torquebox.org/releases'
17-
static final String RUBYGEMS_RELEASE_URL = 'http://rubygems.lasagna.io/proxy/maven/releases'
17+
// static final String RUBYGEMS_RELEASE_URL = 'http://rubygems.lasagna.io/proxy/maven/releases'
1818
static final String VERSION_PROPERTY = 'jrubyVersion'
1919

2020
void apply(Project project) {
@@ -82,7 +82,7 @@ class JRubyPlugin implements Plugin<Project> {
8282
if (!project.repositories.metaClass.respondsTo(project.repositories, 'rubygemsRelease')) {
8383
project.repositories.metaClass.rubygemsRelease << { ->
8484
maven { url TORQUEBOX_RUBYGEMS_RELEASE_URL }
85-
maven { url RUBYGEMS_RELEASE_URL }
85+
// maven { url RUBYGEMS_RELEASE_URL }
8686
}
8787
}
8888
}

0 commit comments

Comments
 (0)