diff options
author | Konstantin Boudnik <cos@apache.org> | 2015-09-14 12:50:19 -0700 |
---|---|---|
committer | Youngwoo Kim <ywkim@apache.org> | 2015-09-15 09:25:22 +0900 |
commit | be796c98323573c7a3dff84a0a5115490c966a0f (patch) | |
tree | 4b34fd4d5ef91246acf822c2f1109e026df444e1 | |
parent | 8eef76a7384d1bb4a70975302aaf231663506e07 (diff) |
BIGTOP-2027. Bump gradle version, the wrapper to 2.7
Signed-off-by: Youngwoo Kim <ywkim@apache.org>
-rw-r--r-- | bigtop_toolchain/manifests/deps.pp | 6 | ||||
-rw-r--r-- | bigtop_toolchain/manifests/gradle.pp | 16 | ||||
-rw-r--r-- | gradle/wrapper/gradle-wrapper.properties | 4 | ||||
-rwxr-xr-x | gradlew | 43 |
4 files changed, 47 insertions, 22 deletions
diff --git a/bigtop_toolchain/manifests/deps.pp b/bigtop_toolchain/manifests/deps.pp index c52d8ef9..9ec2c20b 100644 --- a/bigtop_toolchain/manifests/deps.pp +++ b/bigtop_toolchain/manifests/deps.pp @@ -29,10 +29,4 @@ class bigtop_toolchain::deps { require => Package[$packages::pkgs], unless => "/usr/bin/test -f /usr/src/apache-maven-3.3.3-bin.tar.gz", } - - exec {"/usr/bin/wget http://services.gradle.org/distributions/gradle-2.4-bin.zip": - cwd => "/usr/src", - require => Package[$packages::pkgs], - unless => "/usr/bin/test -f /usr/src/gradle-2.4-bin.zip", - } } diff --git a/bigtop_toolchain/manifests/gradle.pp b/bigtop_toolchain/manifests/gradle.pp index 2c0081f3..70be36e7 100644 --- a/bigtop_toolchain/manifests/gradle.pp +++ b/bigtop_toolchain/manifests/gradle.pp @@ -17,16 +17,22 @@ class bigtop_toolchain::gradle { include bigtop_toolchain::deps - exec {'/usr/bin/unzip -x -o /usr/src/gradle-2.4-bin.zip': + exec {"/usr/bin/wget http://services.gradle.org/distributions/gradle-2.7-bin.zip": + cwd => "/usr/src", + require => Package[$packages::pkgs], + unless => "/usr/bin/test -f /usr/src/gradle-2.7-bin.zip", + } + + exec {'/usr/bin/unzip -x -o /usr/src/gradle-2.7-bin.zip': cwd => '/usr/local', refreshonly => true, - subscribe => Exec["/usr/bin/wget http://services.gradle.org/distributions/gradle-2.4-bin.zip"], - require => Exec["/usr/bin/wget http://services.gradle.org/distributions/gradle-2.4-bin.zip"], + subscribe => Exec["/usr/bin/wget http://services.gradle.org/distributions/gradle-2.7-bin.zip"], + require => Exec["/usr/bin/wget http://services.gradle.org/distributions/gradle-2.7-bin.zip"], } file {'/usr/local/gradle': ensure => link, - target => '/usr/local/gradle-2.4', - require => Exec['/usr/bin/unzip -x -o /usr/src/gradle-2.4-bin.zip'], + target => '/usr/local/gradle-2.7', + require => Exec['/usr/bin/unzip -x -o /usr/src/gradle-2.7-bin.zip'], } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8b980357..c7ae288e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -## +## ## Tries to recreate Gradle's gradlew command in pure bash. ## This way you don't have to worry about binaries in your build. ## @@ -26,10 +26,12 @@ set -e set -o pipefail - APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` +# Use the maximum available, or set MAX_FD != -1 to use that value. + MAX_FD="maximum" + # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS="-Dorg.gradle.appname=$APP_BASE_NAME" @@ -68,22 +70,42 @@ case "`uname`" in ;; esac +# 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. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVA="$JAVA_HOME/jre/sh/java" + JAVACMD="$JAVA_HOME/jre/sh/java" else - JAVA="$JAVA_HOME/bin/java" + JAVACMD="$JAVA_HOME/bin/java" fi - if [ ! -x "$JAVA" ] ; then + if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVA="java" + JAVACMD="java" which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -108,7 +130,7 @@ fi # For Darwin, add options to specify how the application appears in the dock if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$bin/media/gradle.icns\"" + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi # does not match gradle's hash @@ -180,8 +202,8 @@ classpath() { } # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -splitJvmOpts() { - JVM_OPTS=("$@") +function splitJvmOpts() { + JVM_OPTS=("$@") } main() { @@ -190,8 +212,9 @@ main() { fi eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS + JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - $JAVA "${JVM_OPTS[@]}" -cp $(classpath) org.gradle.launcher.GradleMain "$@" + $JAVACMD "${JVM_OPTS[@]}" -cp $(classpath) org.gradle.launcher.GradleMain "$@" } main "$@" |