diff --git a/build.gradle b/build.gradle index 6c30024..feda3c0 100644 --- a/build.gradle +++ b/build.gradle @@ -3,6 +3,7 @@ buildscript { maven { url "https://repo.spring.io/plugins-release" } } dependencies { + classpath 'io.spring.gradle:dependency-management-plugin:0.6.1.RELEASE' classpath("com.bmuschko:gradle-tomcat-plugin:2.2.5") classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7") classpath("io.spring.gradle:spring-io-plugin:0.0.4.RELEASE") diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index c97a8bd..6ffa237 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ef112d9..de9ad74 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Nov 25 20:57:10 CST 2014 +#Fri Nov 11 19:46:57 CET 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-bin.zip diff --git a/gradlew b/gradlew index 8b45b77..9aa616c 100755 --- a/gradlew +++ b/gradlew @@ -6,12 +6,30 @@ ## ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="-Xmx1024M -XX:MaxPermSize=512M" +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +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" @@ -30,6 +48,7 @@ die ( ) { cygwin=false msys=false darwin=false +nonstop=false case "`uname`" in CYGWIN* ) cygwin=true @@ -40,31 +59,11 @@ case "`uname`" in MINGW* ) msys=true ;; + NONSTOP* ) + nonstop=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 -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -90,7 +89,7 @@ location of your Java installation." fi # 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` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then @@ -114,6 +113,7 @@ fi if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` @@ -161,4 +161,9 @@ function splitJvmOpts() { eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +# 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" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradlew.bat b/gradlew.bat index 177e5b2..e95643d 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -8,14 +8,14 @@ @rem Set local scope for the variables with windows NT shell 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=-Xmx1024M -XX:MaxPermSize=512M - set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 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 if defined JAVA_HOME goto findJavaFromJavaHome @@ -46,10 +46,9 @@ echo location of your Java installation. goto fail :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 "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. @@ -60,11 +59,6 @@ set _SKIP=2 if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ :execute @rem Setup the command line diff --git a/samples/grails3/build.gradle b/samples/grails3/build.gradle index 089cf10..2f2d54f 100644 --- a/samples/grails3/build.gradle +++ b/samples/grails3/build.gradle @@ -1,75 +1,70 @@ buildscript { - ext { - grailsVersion = project.grailsVersion - } - repositories { - mavenLocal() - maven { url "https://repo.grails.org/grails/core" } - } - dependencies { - classpath "org.grails:grails-gradle-plugin:$grailsVersion" - classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.5.0" - classpath "org.grails.plugins:hibernate4:5.0.2" - } + ext { + grailsVersion = project.grailsVersion + } + repositories { + mavenLocal() + maven { url "https://repo.grails.org/grails/core" } + } + dependencies { + classpath "org.grails:grails-gradle-plugin:$grailsVersion" + classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.5.0" + classpath "org.grails.plugins:hibernate4:5.0.2" + } } -apply plugin:"eclipse" -apply plugin:"idea" -apply plugin:"war" -apply plugin:"org.grails.grails-web" -apply plugin:"org.grails.grails-gsp" -apply plugin:"asset-pipeline" +apply plugin: "eclipse" +apply plugin: "idea" +apply plugin: "war" +apply plugin: "org.grails.grails-web" +apply plugin: "org.grails.grails-gsp" +apply plugin: "asset-pipeline" apply from: SAMPLE_GRADLE ext { - grailsVersion = project.grailsVersion - gradleWrapperVersion = project.gradleWrapperVersion + grailsVersion = project.grailsVersion } repositories { - mavenLocal() - maven { url "https://repo.grails.org/grails/core" } + mavenLocal() + maven { url "https://repo.grails.org/grails/core" } } dependencyManagement { - imports { - mavenBom "org.grails:grails-bom:$grailsVersion" - } - applyMavenExclusions false + imports { + mavenBom "org.grails:grails-bom:$grailsVersion" + } + applyMavenExclusions false } dependencies { - compile "org.springframework.boot:spring-boot-starter-logging" - compile "org.springframework.boot:spring-boot-autoconfigure" - compile "org.grails:grails-core" - compile "org.springframework.boot:spring-boot-starter-actuator" - compile "org.springframework.boot:spring-boot-starter-tomcat" - compile "org.grails:grails-dependencies" - compile "org.grails:grails-web-boot" - compile "org.grails.plugins:cache" - compile "org.grails.plugins:scaffolding" - compile "org.grails.plugins:hibernate4" - compile "org.hibernate:hibernate-ehcache" - console "org.grails:grails-console" - profile "org.grails.profiles:web:3.1.4" - runtime "org.grails.plugins:asset-pipeline" - runtime "com.h2database:h2" - testCompile "org.grails:grails-plugin-testing" - testCompile "org.grails.plugins:geb" - testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1" - testRuntime "net.sourceforge.htmlunit:htmlunit:2.18" + compile "org.springframework.boot:spring-boot-starter-logging" + compile "org.springframework.boot:spring-boot-autoconfigure" + compile "org.grails:grails-core" + compile "org.springframework.boot:spring-boot-starter-actuator" + compile "org.springframework.boot:spring-boot-starter-tomcat" + compile "org.grails:grails-dependencies" + compile "org.grails:grails-web-boot" + compile "org.grails.plugins:cache" + compile "org.grails.plugins:scaffolding" + compile "org.grails.plugins:hibernate4" + compile "org.hibernate:hibernate-ehcache" + console "org.grails:grails-console" + profile "org.grails.profiles:web:3.1.4" + runtime "org.grails.plugins:asset-pipeline" + runtime "com.h2database:h2" + testCompile "org.grails:grails-plugin-testing" + testCompile "org.grails.plugins:geb" + testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1" + testRuntime "net.sourceforge.htmlunit:htmlunit:2.18" - compile "org.springframework.boot:spring-boot-starter-redis" - compile 'org.springframework.session:spring-session:1.1.1.RELEASE' + compile "org.springframework.boot:spring-boot-starter-redis" + compile 'org.springframework.session:spring-session:1.1.1.RELEASE' - compile 'org.grails.plugins:spring-security-core:3.0.4' -} - -task wrapper(type: Wrapper) { - gradleVersion = gradleWrapperVersion + compile 'org.grails.plugins:spring-security-core:3.0.4' } assets { - minifyJs = true - minifyCss = true + minifyJs = true + minifyCss = true } diff --git a/samples/grails3/gradle.properties b/samples/grails3/gradle.properties index b6709f3..ccd969e 100644 --- a/samples/grails3/gradle.properties +++ b/samples/grails3/gradle.properties @@ -1,2 +1 @@ grailsVersion=3.1.4 -gradleWrapperVersion=2.9