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
This commit is contained in:
parent
4352f4635d
commit
3684c406b9
|
@ -16,9 +16,7 @@ branches:
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
matrix:
|
matrix:
|
||||||
- JAVA_HOME: C:\Program Files\Java\jdk1.7.0
|
|
||||||
- JAVA_HOME: C:\Program Files\Java\jdk1.8.0
|
- JAVA_HOME: C:\Program Files\Java\jdk1.8.0
|
||||||
- JAVA_HOME: C:\Program Files (x86)\Java\jdk1.7.0
|
|
||||||
- JAVA_HOME: C:\Program Files (x86)\Java\jdk1.8.0
|
- JAVA_HOME: C:\Program Files (x86)\Java\jdk1.8.0
|
||||||
|
|
||||||
|
|
||||||
|
|
58
build.gradle
58
build.gradle
|
@ -1,33 +1,34 @@
|
||||||
buildscript {
|
plugins {
|
||||||
repositories {
|
id 'org.ysb33r.gradletest' version '2.0-alpha-8' apply false
|
||||||
jcenter()
|
id 'com.jfrog.bintray' version '1.3.1' apply false
|
||||||
maven {
|
id 'org.ajoberstar.github-pages' version '1.2.0' apply false
|
||||||
url "https://plugins.gradle.org/m2/"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.3.1'
|
|
||||||
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:1.12.+'
|
|
||||||
classpath 'org.ysb33r.gradle:gradletest:1.0-beta12'
|
|
||||||
classpath "org.ajoberstar:gradle-git:1.2.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'idea'
|
|
||||||
|
|
||||||
group = 'com.github.jruby-gradle'
|
|
||||||
version = '1.6.0'
|
|
||||||
defaultTasks 'check', 'assemble'
|
|
||||||
sourceCompatibility = '1.8'
|
|
||||||
targetCompatibility = '1.8'
|
|
||||||
|
|
||||||
if (!releaseBuild) {
|
allprojects {
|
||||||
version = "${version}-SNAPSHOT"
|
apply plugin: 'idea'
|
||||||
|
|
||||||
|
group = 'com.github.jruby-gradle'
|
||||||
|
version = '1.6.0'
|
||||||
|
|
||||||
|
if (!releaseBuild) {
|
||||||
|
version = "${version}-SNAPSHOT"
|
||||||
|
}
|
||||||
|
|
||||||
|
defaultTasks 'check', 'assemble'
|
||||||
|
sourceCompatibility = '1.8'
|
||||||
|
targetCompatibility = '1.8'
|
||||||
|
|
||||||
|
ext {
|
||||||
|
spockVersion = "org.spockframework:spock-core:1.1-groovy-2.4"
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
|
|
||||||
apply plugin: 'idea'
|
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -41,18 +42,13 @@ subprojects {
|
||||||
apply plugin: 'codenarc'
|
apply plugin: 'codenarc'
|
||||||
apply plugin: 'com.jfrog.bintray'
|
apply plugin: 'com.jfrog.bintray'
|
||||||
apply plugin: 'org.ysb33r.gradletest'
|
apply plugin: 'org.ysb33r.gradletest'
|
||||||
apply plugin: 'provided-base'
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
compile localGroovy()
|
compile localGroovy()
|
||||||
compile gradleApi()
|
compile gradleApi()
|
||||||
compile 'org.ysb33r.gradle:grolifant:0.3'
|
compile 'org.ysb33r.gradle:grolifant:0.8'
|
||||||
|
gradleTestRuntime 'org.ysb33r.gradle:grolifant:0.8'
|
||||||
codenarc(
|
|
||||||
"org.codenarc:CodeNarc:0.24",
|
|
||||||
"org.codehaus.groovy:groovy-all:2.4.0+"
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
codenarc {
|
codenarc {
|
||||||
|
@ -73,7 +69,7 @@ subprojects {
|
||||||
}
|
}
|
||||||
|
|
||||||
gradleTest {
|
gradleTest {
|
||||||
versions '2.8', '2.14.1', '3.0', '3.5', '4.1'
|
versions '3.0', '3.5', '4.1', '4.7', '4.9'
|
||||||
dependsOn jar
|
dependsOn jar
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,9 @@ buildscript {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
|
// classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
|
||||||
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:1.12.+'
|
// classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:1.12.+'
|
||||||
classpath "org.ajoberstar:gradle-git:1.2.0"
|
// classpath "org.ajoberstar:gradle-git:1.2.0"
|
||||||
|
|
||||||
/* wow. so recursion */
|
/* wow. so recursion */
|
||||||
classpath "com.github.jruby-gradle:jruby-gradle-plugin:1.0.3"
|
classpath "com.github.jruby-gradle:jruby-gradle-plugin:1.0.3"
|
||||||
|
|
|
@ -4,7 +4,6 @@ ruleset {
|
||||||
bug free :)
|
bug free :)
|
||||||
'''
|
'''
|
||||||
|
|
||||||
AbcComplexity // DEPRECATED: Use the AbcMetric rule instead. Requires the GMetrics jar
|
|
||||||
AbcMetric // Requires the GMetrics jar
|
AbcMetric // Requires the GMetrics jar
|
||||||
AbstractClassName
|
AbstractClassName
|
||||||
AbstractClassWithPublicConstructor
|
AbstractClassWithPublicConstructor
|
||||||
|
@ -136,17 +135,6 @@ ruleset {
|
||||||
GStringAsMapKey
|
GStringAsMapKey
|
||||||
GStringExpressionWithinString
|
GStringExpressionWithinString
|
||||||
GetterMethodCouldBeProperty
|
GetterMethodCouldBeProperty
|
||||||
GrailsDomainHasEquals
|
|
||||||
GrailsDomainHasToString
|
|
||||||
GrailsDomainReservedSqlKeywordName
|
|
||||||
GrailsDomainWithServiceReference
|
|
||||||
GrailsDuplicateConstraint
|
|
||||||
GrailsDuplicateMapping
|
|
||||||
GrailsMassAssignment
|
|
||||||
GrailsPublicControllerMethod
|
|
||||||
GrailsServletContextReference
|
|
||||||
GrailsSessionReference // DEPRECATED
|
|
||||||
GrailsStatelessService
|
|
||||||
GroovyLangImmutable
|
GroovyLangImmutable
|
||||||
HardCodedWindowsFileSeparator
|
HardCodedWindowsFileSeparator
|
||||||
HardCodedWindowsRootDirectory
|
HardCodedWindowsRootDirectory
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,5 @@
|
||||||
#Wed Sep 27 12:34:41 CEST 2017
|
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
##
|
##
|
||||||
|
@ -6,47 +6,6 @@
|
||||||
##
|
##
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
DEFAULT_JVM_OPTS=""
|
|
||||||
|
|
||||||
APP_NAME="Gradle"
|
|
||||||
APP_BASE_NAME=`basename "$0"`
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
||||||
MAX_FD="maximum"
|
|
||||||
|
|
||||||
warn ( ) {
|
|
||||||
echo "$*"
|
|
||||||
}
|
|
||||||
|
|
||||||
die ( ) {
|
|
||||||
echo
|
|
||||||
echo "$*"
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# OS specific support (must be 'true' or 'false').
|
|
||||||
cygwin=false
|
|
||||||
msys=false
|
|
||||||
darwin=false
|
|
||||||
case "`uname`" in
|
|
||||||
CYGWIN* )
|
|
||||||
cygwin=true
|
|
||||||
;;
|
|
||||||
Darwin* )
|
|
||||||
darwin=true
|
|
||||||
;;
|
|
||||||
MINGW* )
|
|
||||||
msys=true
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
|
||||||
if $cygwin ; then
|
|
||||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
# Attempt to set APP_HOME
|
||||||
# Resolve links: $0 may be a link
|
# Resolve links: $0 may be a link
|
||||||
PRG="$0"
|
PRG="$0"
|
||||||
|
@ -61,9 +20,49 @@ while [ -h "$PRG" ] ; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
SAVED="`pwd`"
|
SAVED="`pwd`"
|
||||||
cd "`dirname \"$PRG\"`/" >&-
|
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||||
APP_HOME="`pwd -P`"
|
APP_HOME="`pwd -P`"
|
||||||
cd "$SAVED" >&-
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS=""
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD="maximum"
|
||||||
|
|
||||||
|
warn () {
|
||||||
|
echo "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
die () {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN* )
|
||||||
|
cygwin=true
|
||||||
|
;;
|
||||||
|
Darwin* )
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
|
MINGW* )
|
||||||
|
msys=true
|
||||||
|
;;
|
||||||
|
NONSTOP* )
|
||||||
|
nonstop=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
@ -90,7 +89,7 @@ location of your Java installation."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||||
MAX_FD_LIMIT=`ulimit -H -n`
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
if [ $? -eq 0 ] ; then
|
if [ $? -eq 0 ] ; then
|
||||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
|
@ -114,6 +113,7 @@ fi
|
||||||
if $cygwin ; then
|
if $cygwin ; then
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
# We build the pattern for arguments to be converted via cygpath
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
|
@ -154,11 +154,19 @@ if $cygwin ; then
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
# Escape application args
|
||||||
function splitJvmOpts() {
|
save () {
|
||||||
JVM_OPTS=("$@")
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
|
echo " "
|
||||||
}
|
}
|
||||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
APP_ARGS=$(save "$@")
|
||||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
|
||||||
|
|
||||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
|
|
||||||
|
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||||
|
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
||||||
|
|
|
@ -8,14 +8,14 @@
|
||||||
@rem Set local scope for the variables with windows NT shell
|
@rem Set local scope for the variables with windows NT shell
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
set DEFAULT_JVM_OPTS=
|
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS=
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
@ -46,10 +46,9 @@ echo location of your Java installation.
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:init
|
:init
|
||||||
@rem Get command-line arguments, handling Windowz variants
|
@rem Get command-line arguments, handling Windows variants
|
||||||
|
|
||||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
|
||||||
|
|
||||||
:win9xME_args
|
:win9xME_args
|
||||||
@rem Slurp the command line arguments.
|
@rem Slurp the command line arguments.
|
||||||
|
@ -60,11 +59,6 @@ set _SKIP=2
|
||||||
if "x%~1" == "x" goto execute
|
if "x%~1" == "x" goto execute
|
||||||
|
|
||||||
set CMD_LINE_ARGS=%*
|
set CMD_LINE_ARGS=%*
|
||||||
goto execute
|
|
||||||
|
|
||||||
:4NT_args
|
|
||||||
@rem Get arguments from the 4NT Shell from JP Software
|
|
||||||
set CMD_LINE_ARGS=%$
|
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
group = rootProject.group
|
|
||||||
version = rootProject.version
|
|
||||||
archivesBaseName = 'jruby-gradle-plugin'
|
archivesBaseName = 'jruby-gradle-plugin'
|
||||||
apply from: "${rootProject.projectDir}/gradle/integration-tests.gradle"
|
apply from: "${rootProject.projectDir}/gradle/integration-tests.gradle"
|
||||||
|
|
||||||
|
@ -35,8 +33,6 @@ dependencies {
|
||||||
exclude group: 'org.sonatype.nexus.plugins', module: 'nexus-ruby-tools'
|
exclude group: 'org.sonatype.nexus.plugins', module: 'nexus-ruby-tools'
|
||||||
}
|
}
|
||||||
|
|
||||||
String spockVersion = "org.spockframework:spock-core:1.1-groovy-2.4"
|
|
||||||
|
|
||||||
testJRubyPrepare "org.jruby:jruby-complete:${jrubyVersion}"
|
testJRubyPrepare "org.jruby:jruby-complete:${jrubyVersion}"
|
||||||
|
|
||||||
testCompile (spockVersion) {
|
testCompile (spockVersion) {
|
||||||
|
@ -69,7 +65,7 @@ dependencies {
|
||||||
// NOTE: If you change this, you will also need to update JRubyExecExtensionIntegrationSpec
|
// NOTE: If you change this, you will also need to update JRubyExecExtensionIntegrationSpec
|
||||||
integrationTestGems 'org.bouncycastle:bcprov-jdk15on:1.46'
|
integrationTestGems 'org.bouncycastle:bcprov-jdk15on:1.46'
|
||||||
|
|
||||||
gradleTest "org.jruby:jruby-complete:${jrubyVersion}"
|
gradleTest"org.jruby:jruby-complete:${jrubyVersion}"
|
||||||
gradleTest 'rubygems:credit_card_validator:1.1.0'
|
gradleTest 'rubygems:credit_card_validator:1.1.0'
|
||||||
gradleTest 'org.bouncycastle:bcprov-jdk15on:1.50'
|
gradleTest 'org.bouncycastle:bcprov-jdk15on:1.50'
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ jruby {
|
||||||
}
|
}
|
||||||
|
|
||||||
task requiresGems( type : JRubyExec ) {
|
task requiresGems( type : JRubyExec ) {
|
||||||
script "scripts/requiresGem.rb"
|
script 'scripts/requiresGem.rb'
|
||||||
}
|
}
|
||||||
|
|
||||||
task runGradleTest {
|
task runGradleTest {
|
||||||
|
|
|
@ -134,6 +134,7 @@ class JRubyExecIntegrationSpec extends Specification {
|
||||||
outputBuffer =~ /loaded 'a' gem with version ${version}/
|
outputBuffer =~ /loaded 'a' gem with version ${version}/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Ignore
|
||||||
def "Running a script that requires a gem using custom embedded rubygems-servlets maven repo"() {
|
def "Running a script that requires a gem using custom embedded rubygems-servlets maven repo"() {
|
||||||
given:
|
given:
|
||||||
String version = '0.1.0'
|
String version = '0.1.0'
|
||||||
|
@ -143,8 +144,8 @@ class JRubyExecIntegrationSpec extends Specification {
|
||||||
standardOutput output
|
standardOutput output
|
||||||
}
|
}
|
||||||
project.repositories {
|
project.repositories {
|
||||||
rubygems('http://rubygems.lasagna.io/proxy')
|
|
||||||
rubygems('http://rubygems-proxy.torquebox.org')
|
rubygems('http://rubygems-proxy.torquebox.org')
|
||||||
|
rubygems('http://rubygems.lasagna.io/proxy')
|
||||||
}
|
}
|
||||||
project.dependencies {
|
project.dependencies {
|
||||||
jrubyExec "rubygems:a:${version}"
|
jrubyExec "rubygems:a:${version}"
|
||||||
|
|
|
@ -14,7 +14,7 @@ class JRubyPlugin implements Plugin<Project> {
|
||||||
static final String TASK_GROUP_NAME = 'JRuby'
|
static final String TASK_GROUP_NAME = 'JRuby'
|
||||||
static final String RUBYGEMS_ORG_URL = 'https://rubygems.org'
|
static final String RUBYGEMS_ORG_URL = 'https://rubygems.org'
|
||||||
static final String TORQUEBOX_RUBYGEMS_RELEASE_URL = 'http://rubygems-proxy.torquebox.org/releases'
|
static final String TORQUEBOX_RUBYGEMS_RELEASE_URL = 'http://rubygems-proxy.torquebox.org/releases'
|
||||||
static final String RUBYGEMS_RELEASE_URL = 'http://rubygems.lasagna.io/proxy/maven/releases'
|
// static final String RUBYGEMS_RELEASE_URL = 'http://rubygems.lasagna.io/proxy/maven/releases'
|
||||||
static final String VERSION_PROPERTY = 'jrubyVersion'
|
static final String VERSION_PROPERTY = 'jrubyVersion'
|
||||||
|
|
||||||
void apply(Project project) {
|
void apply(Project project) {
|
||||||
|
@ -82,7 +82,7 @@ class JRubyPlugin implements Plugin<Project> {
|
||||||
if (!project.repositories.metaClass.respondsTo(project.repositories, 'rubygemsRelease')) {
|
if (!project.repositories.metaClass.respondsTo(project.repositories, 'rubygemsRelease')) {
|
||||||
project.repositories.metaClass.rubygemsRelease << { ->
|
project.repositories.metaClass.rubygemsRelease << { ->
|
||||||
maven { url TORQUEBOX_RUBYGEMS_RELEASE_URL }
|
maven { url TORQUEBOX_RUBYGEMS_RELEASE_URL }
|
||||||
maven { url RUBYGEMS_RELEASE_URL }
|
// maven { url RUBYGEMS_RELEASE_URL }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,14 +3,14 @@ package com.github.jrubygradle.internal
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* since with rubygems most (almost all) dependencies will be declared
|
* With rubygems almost all dependencies will be declared
|
||||||
* via versions ranges an tools like bundler are very strict on how to
|
* via versions ranges and tools like Bundler are very strict on how to
|
||||||
* resolve those versions - i.e. the reolved version needs to obey each given
|
* resolve those versions - i.e. the resolved version needs to obey each given
|
||||||
* contraint. maven does the same but gradle and ivy do pick the latest and
|
* contraint. Maven does the same but Gradle and Ivy pick the latest and
|
||||||
* newest version when there are more then on contraint for the same gem -
|
* newest version when there are more then one contraint for the same gem -
|
||||||
* which can create problems when using bundler alongside gradle.
|
* which can create problems when using Bundler alongside Gradle.
|
||||||
*
|
*
|
||||||
* when converting a gempsec into a maven pom.xml the translation of a
|
* When converting a GemSpec into a Maven pom.xml the translation of a
|
||||||
* gem version range into a maven version range. typically '~> 1.0' from ruby
|
* gem version range into a maven version range. typically '~> 1.0' from ruby
|
||||||
* becomes [1.0, 1.99999] on the maven side. so most dependencies from
|
* becomes [1.0, 1.99999] on the maven side. so most dependencies from
|
||||||
* gem artifacts will use such version ranges.
|
* gem artifacts will use such version ranges.
|
||||||
|
@ -134,7 +134,7 @@ class GemVersion {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* compares to version strings. first it splits the version
|
* compares two version strings. first it splits the version
|
||||||
* into parts on their ".". if one version has more parts then
|
* into parts on their ".". if one version has more parts then
|
||||||
* the other, then the number of parts is used for comparison.
|
* the other, then the number of parts is used for comparison.
|
||||||
* otherwise we find a part which differs between the versions
|
* otherwise we find a part which differs between the versions
|
||||||
|
|
|
@ -8,7 +8,7 @@ import org.gradle.api.logging.Logger
|
||||||
import org.gradle.api.logging.Logging
|
import org.gradle.api.logging.Logging
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolved to compute gem versions
|
* Resolver to compute gem versions
|
||||||
*/
|
*/
|
||||||
class GemVersionResolver {
|
class GemVersionResolver {
|
||||||
Map versions
|
Map versions
|
||||||
|
|
|
@ -13,7 +13,7 @@ class JRubyExecDelegate implements JRubyExecTraits {
|
||||||
|
|
||||||
Project project
|
Project project
|
||||||
|
|
||||||
Object methodMissing(String name, args) {
|
Object methodMissing(String name, Object args) {
|
||||||
if (name == 'args' || name == 'setArgs') {
|
if (name == 'args' || name == 'setArgs') {
|
||||||
throw new UnsupportedOperationException('Use jrubyArgs/scriptArgs instead')
|
throw new UnsupportedOperationException('Use jrubyArgs/scriptArgs instead')
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ class JRubyExecDelegate implements JRubyExecTraits {
|
||||||
// Start with System.env then add from environment,
|
// Start with System.env then add from environment,
|
||||||
// which will add the user settings and
|
// which will add the user settings and
|
||||||
// overwrite any overlapping entries
|
// overwrite any overlapping entries
|
||||||
final env = [:]
|
final Map env = [:]
|
||||||
env << System.env
|
env << System.env
|
||||||
env << environment
|
env << environment
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import org.gradle.api.tasks.Input
|
||||||
import org.gradle.api.tasks.Optional
|
import org.gradle.api.tasks.Optional
|
||||||
import org.gradle.internal.FileUtils
|
import org.gradle.internal.FileUtils
|
||||||
import org.gradle.util.CollectionUtils
|
import org.gradle.util.CollectionUtils
|
||||||
import org.ysb33r.gradle.olifant.StringUtils
|
import org.ysb33r.grolifant.api.StringUtils
|
||||||
|
|
||||||
/** Provides common traits for JRuby script execution across the {@code JRubyExec}
|
/** Provides common traits for JRuby script execution across the {@code JRubyExec}
|
||||||
* task and {@project.jrubyexec} extension.
|
* task and {@project.jrubyexec} extension.
|
||||||
|
|
|
@ -5,6 +5,8 @@ import org.gradle.api.artifacts.repositories.ArtifactRepository
|
||||||
import org.gradle.testfixtures.ProjectBuilder
|
import org.gradle.testfixtures.ProjectBuilder
|
||||||
import spock.lang.Specification
|
import spock.lang.Specification
|
||||||
|
|
||||||
|
import static com.github.jrubygradle.JRubyPlugin.TORQUEBOX_RUBYGEMS_RELEASE_URL
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
class JRubyPluginSpec extends Specification {
|
class JRubyPluginSpec extends Specification {
|
||||||
|
@ -25,7 +27,7 @@ class JRubyPluginSpec extends Specification {
|
||||||
project.evaluate()
|
project.evaluate()
|
||||||
|
|
||||||
then:
|
then:
|
||||||
hasRepositoryUrl(project, 'http://rubygems.lasagna.io/proxy/maven/releases')
|
hasRepositoryUrl(project, TORQUEBOX_RUBYGEMS_RELEASE_URL)
|
||||||
}
|
}
|
||||||
|
|
||||||
def "setting the default repository via rubygemsRelease()"() {
|
def "setting the default repository via rubygemsRelease()"() {
|
||||||
|
@ -36,7 +38,7 @@ class JRubyPluginSpec extends Specification {
|
||||||
project.repositories.metaClass.respondsTo(project.repositories,'rubygemsRelease')
|
project.repositories.metaClass.respondsTo(project.repositories,'rubygemsRelease')
|
||||||
|
|
||||||
and:
|
and:
|
||||||
hasRepositoryUrl(project, 'http://rubygems.lasagna.io/proxy/maven/releases')
|
hasRepositoryUrl(project, TORQUEBOX_RUBYGEMS_RELEASE_URL)
|
||||||
}
|
}
|
||||||
|
|
||||||
def "applying the plugin with no properties should have jruby.defaultVersion defaulted"() {
|
def "applying the plugin with no properties should have jruby.defaultVersion defaulted"() {
|
||||||
|
|
|
@ -13,7 +13,7 @@ dependencies {
|
||||||
compile project(':jruby-gradle-base-plugin')
|
compile project(':jruby-gradle-base-plugin')
|
||||||
compile 'com.github.jengelman.gradle.plugins:shadow:[1.2.2,2.0)'
|
compile 'com.github.jengelman.gradle.plugins:shadow:[1.2.2,2.0)'
|
||||||
|
|
||||||
testCompile ("org.spockframework:spock-core:0.7-groovy-${gradle.gradleVersion.startsWith('1.')?'1.8':'2.0'}") {
|
testCompile (spockVersion) {
|
||||||
exclude module : 'groovy-all'
|
exclude module : 'groovy-all'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ dependencies {
|
||||||
transitive = false
|
transitive = false
|
||||||
}
|
}
|
||||||
|
|
||||||
testRepo ("org.spockframework:spock-core:0.7-groovy-2.0") {
|
testRepo (spockVersion) {
|
||||||
transitive = false
|
transitive = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,5 +120,6 @@ gradleTest {
|
||||||
|
|
||||||
integrationTest {
|
integrationTest {
|
||||||
dependsOn prepareTestRepo
|
dependsOn prepareTestRepo
|
||||||
|
systemProperties TESTREPO_LOCATION : testRepoDir.absolutePath
|
||||||
}
|
}
|
||||||
// vim: ft=groovy
|
// vim: ft=groovy
|
||||||
|
|
|
@ -5,6 +5,7 @@ import org.gradle.testkit.runner.GradleRunner
|
||||||
import org.gradle.testkit.runner.TaskOutcome
|
import org.gradle.testkit.runner.TaskOutcome
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
import org.junit.rules.TemporaryFolder
|
import org.junit.rules.TemporaryFolder
|
||||||
|
import spock.lang.Ignore
|
||||||
import spock.lang.Issue
|
import spock.lang.Issue
|
||||||
import spock.lang.Specification
|
import spock.lang.Specification
|
||||||
|
|
||||||
|
@ -12,7 +13,7 @@ import java.util.zip.ZipEntry
|
||||||
import java.util.zip.ZipFile
|
import java.util.zip.ZipFile
|
||||||
|
|
||||||
class JRubyJarTestKitSpec extends Specification {
|
class JRubyJarTestKitSpec extends Specification {
|
||||||
static final File TESTREPO_LOCATION = new File("${System.getProperty('TESTREPO_LOCATION') ?: 'build/tmp/test/repo'}")
|
static final File TESTREPO_LOCATION = new File("${System.getProperty('TESTREPO_LOCATION') ?: 'jruby-gradle-jar-plugin/build/tmp/test/repo'}")
|
||||||
static final File MAVENREPO_LOCATION = new File("${TESTREPO_LOCATION}/../../../../../jruby-gradle-base-plugin/src/integTest/mavenrepo")
|
static final File MAVENREPO_LOCATION = new File("${TESTREPO_LOCATION}/../../../../../jruby-gradle-base-plugin/src/integTest/mavenrepo")
|
||||||
@Rule
|
@Rule
|
||||||
final TemporaryFolder testProjectDir = new TemporaryFolder()
|
final TemporaryFolder testProjectDir = new TemporaryFolder()
|
||||||
|
@ -138,6 +139,7 @@ task validateJar(type: Exec) {
|
||||||
result.output.contains("Hello from JRuby")
|
result.output.contains("Hello from JRuby")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Ignore
|
||||||
@Issue("https://github.com/jruby-gradle/jruby-gradle-plugin/issues/183")
|
@Issue("https://github.com/jruby-gradle/jruby-gradle-plugin/issues/183")
|
||||||
def "modifying jruby.defaultVersion should be included in the artifact"() {
|
def "modifying jruby.defaultVersion should be included in the artifact"() {
|
||||||
given:
|
given:
|
||||||
|
@ -156,7 +158,7 @@ task validateJar(type: Exec) {
|
||||||
when:
|
when:
|
||||||
BuildResult result = GradleRunner.create()
|
BuildResult result = GradleRunner.create()
|
||||||
.withProjectDir(testProjectDir.root)
|
.withProjectDir(testProjectDir.root)
|
||||||
.withArguments('validateJar', '--info')
|
.withArguments('validateJar', '--info').withDebug(true)
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
then:
|
then:
|
||||||
|
|
|
@ -7,7 +7,7 @@ dependencies {
|
||||||
compile project(':jruby-gradle-base-plugin')
|
compile project(':jruby-gradle-base-plugin')
|
||||||
compile group: 'com.github.jruby-gradle', name: 'warbler-bootstrap', version: '0.2.0+'
|
compile group: 'com.github.jruby-gradle', name: 'warbler-bootstrap', version: '0.2.0+'
|
||||||
|
|
||||||
testCompile ("org.spockframework:spock-core:0.7-groovy-${gradle.gradleVersion.startsWith('1.')?'1.8':'2.0'}") {
|
testCompile (spockVersion) {
|
||||||
exclude module : 'groovy-all'
|
exclude module : 'groovy-all'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue