1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gradlew Fri Oct 23 18:01:40 2020 +0200 1.3 @@ -0,0 +1,183 @@ 1.4 +#!/usr/bin/env sh 1.5 + 1.6 +# 1.7 +# Copyright 2015 the original author or authors. 1.8 +# 1.9 +# Licensed under the Apache License, Version 2.0 (the "License"); 1.10 +# you may not use this file except in compliance with the License. 1.11 +# You may obtain a copy of the License at 1.12 +# 1.13 +# https://www.apache.org/licenses/LICENSE-2.0 1.14 +# 1.15 +# Unless required by applicable law or agreed to in writing, software 1.16 +# distributed under the License is distributed on an "AS IS" BASIS, 1.17 +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1.18 +# See the License for the specific language governing permissions and 1.19 +# limitations under the License. 1.20 +# 1.21 + 1.22 +############################################################################## 1.23 +## 1.24 +## Gradle start up script for UN*X 1.25 +## 1.26 +############################################################################## 1.27 + 1.28 +# Attempt to set APP_HOME 1.29 +# Resolve links: $0 may be a link 1.30 +PRG="$0" 1.31 +# Need this for relative symlinks. 1.32 +while [ -h "$PRG" ] ; do 1.33 + ls=`ls -ld "$PRG"` 1.34 + link=`expr "$ls" : '.*-> \(.*\)$'` 1.35 + if expr "$link" : '/.*' > /dev/null; then 1.36 + PRG="$link" 1.37 + else 1.38 + PRG=`dirname "$PRG"`"/$link" 1.39 + fi 1.40 +done 1.41 +SAVED="`pwd`" 1.42 +cd "`dirname \"$PRG\"`/" >/dev/null 1.43 +APP_HOME="`pwd -P`" 1.44 +cd "$SAVED" >/dev/null 1.45 + 1.46 +APP_NAME="Gradle" 1.47 +APP_BASE_NAME=`basename "$0"` 1.48 + 1.49 +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 1.50 +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 1.51 + 1.52 +# Use the maximum available, or set MAX_FD != -1 to use that value. 1.53 +MAX_FD="maximum" 1.54 + 1.55 +warn () { 1.56 + echo "$*" 1.57 +} 1.58 + 1.59 +die () { 1.60 + echo 1.61 + echo "$*" 1.62 + echo 1.63 + exit 1 1.64 +} 1.65 + 1.66 +# OS specific support (must be 'true' or 'false'). 1.67 +cygwin=false 1.68 +msys=false 1.69 +darwin=false 1.70 +nonstop=false 1.71 +case "`uname`" in 1.72 + CYGWIN* ) 1.73 + cygwin=true 1.74 + ;; 1.75 + Darwin* ) 1.76 + darwin=true 1.77 + ;; 1.78 + MINGW* ) 1.79 + msys=true 1.80 + ;; 1.81 + NONSTOP* ) 1.82 + nonstop=true 1.83 + ;; 1.84 +esac 1.85 + 1.86 +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 1.87 + 1.88 +# Determine the Java command to use to start the JVM. 1.89 +if [ -n "$JAVA_HOME" ] ; then 1.90 + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 1.91 + # IBM's JDK on AIX uses strange locations for the executables 1.92 + JAVACMD="$JAVA_HOME/jre/sh/java" 1.93 + else 1.94 + JAVACMD="$JAVA_HOME/bin/java" 1.95 + fi 1.96 + if [ ! -x "$JAVACMD" ] ; then 1.97 + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 1.98 + 1.99 +Please set the JAVA_HOME variable in your environment to match the 1.100 +location of your Java installation." 1.101 + fi 1.102 +else 1.103 + JAVACMD="java" 1.104 + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1.105 + 1.106 +Please set the JAVA_HOME variable in your environment to match the 1.107 +location of your Java installation." 1.108 +fi 1.109 + 1.110 +# Increase the maximum file descriptors if we can. 1.111 +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 1.112 + MAX_FD_LIMIT=`ulimit -H -n` 1.113 + if [ $? -eq 0 ] ; then 1.114 + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 1.115 + MAX_FD="$MAX_FD_LIMIT" 1.116 + fi 1.117 + ulimit -n $MAX_FD 1.118 + if [ $? -ne 0 ] ; then 1.119 + warn "Could not set maximum file descriptor limit: $MAX_FD" 1.120 + fi 1.121 + else 1.122 + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 1.123 + fi 1.124 +fi 1.125 + 1.126 +# For Darwin, add options to specify how the application appears in the dock 1.127 +if $darwin; then 1.128 + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 1.129 +fi 1.130 + 1.131 +# For Cygwin or MSYS, switch paths to Windows format before running java 1.132 +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 1.133 + APP_HOME=`cygpath --path --mixed "$APP_HOME"` 1.134 + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 1.135 + JAVACMD=`cygpath --unix "$JAVACMD"` 1.136 + 1.137 + # We build the pattern for arguments to be converted via cygpath 1.138 + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 1.139 + SEP="" 1.140 + for dir in $ROOTDIRSRAW ; do 1.141 + ROOTDIRS="$ROOTDIRS$SEP$dir" 1.142 + SEP="|" 1.143 + done 1.144 + OURCYGPATTERN="(^($ROOTDIRS))" 1.145 + # Add a user-defined pattern to the cygpath arguments 1.146 + if [ "$GRADLE_CYGPATTERN" != "" ] ; then 1.147 + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 1.148 + fi 1.149 + # Now convert the arguments - kludge to limit ourselves to /bin/sh 1.150 + i=0 1.151 + for arg in "$@" ; do 1.152 + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 1.153 + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 1.154 + 1.155 + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 1.156 + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 1.157 + else 1.158 + eval `echo args$i`="\"$arg\"" 1.159 + fi 1.160 + i=`expr $i + 1` 1.161 + done 1.162 + case $i in 1.163 + 0) set -- ;; 1.164 + 1) set -- "$args0" ;; 1.165 + 2) set -- "$args0" "$args1" ;; 1.166 + 3) set -- "$args0" "$args1" "$args2" ;; 1.167 + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 1.168 + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 1.169 + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 1.170 + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 1.171 + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 1.172 + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 1.173 + esac 1.174 +fi 1.175 + 1.176 +# Escape application args 1.177 +save () { 1.178 + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 1.179 + echo " " 1.180 +} 1.181 +APP_ARGS=`save "$@"` 1.182 + 1.183 +# Collect all arguments for the java command, following the shell quoting and substitution rules 1.184 +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 1.185 + 1.186 +exec "$JAVACMD" "$@"