Codebase list jd-gui / 8badf81
Add the Gradle wrapper This way Gradle 2.4 can easily be bootstrapped. Sebastian Schuberth authored 8 years ago emmanue1 committed 8 years ago
5 changed file(s) with 263 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
66 # Declare script files that will always have LF line endings on checkout.
77 *.sh text eol=lf
88
9 # Declare script files that will always have CR/LF line endings on checkout.
10 *.bat text eol=crlf
11
912 # Denote all files that are truly binary and should not be modified.
1013 *.png binary
1114 *.jpg binary
0 #Mon Jul 06 16:38:55 CEST 2015
1 distributionBase=GRADLE_USER_HOME
2 distributionPath=wrapper/dists
3 zipStoreBase=GRADLE_USER_HOME
4 zipStorePath=wrapper/dists
5 distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
0 #!/usr/bin/env bash
1
2 ##############################################################################
3 ##
4 ## Gradle start up script for UN*X
5 ##
6 ##############################################################################
7
8 # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
9 DEFAULT_JVM_OPTS=""
10
11 APP_NAME="Gradle"
12 APP_BASE_NAME=`basename "$0"`
13
14 # Use the maximum available, or set MAX_FD != -1 to use that value.
15 MAX_FD="maximum"
16
17 warn ( ) {
18 echo "$*"
19 }
20
21 die ( ) {
22 echo
23 echo "$*"
24 echo
25 exit 1
26 }
27
28 # OS specific support (must be 'true' or 'false').
29 cygwin=false
30 msys=false
31 darwin=false
32 case "`uname`" in
33 CYGWIN* )
34 cygwin=true
35 ;;
36 Darwin* )
37 darwin=true
38 ;;
39 MINGW* )
40 msys=true
41 ;;
42 esac
43
44 # For Cygwin, ensure paths are in UNIX format before anything is touched.
45 if $cygwin ; then
46 [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
47 fi
48
49 # Attempt to set APP_HOME
50 # Resolve links: $0 may be a link
51 PRG="$0"
52 # Need this for relative symlinks.
53 while [ -h "$PRG" ] ; do
54 ls=`ls -ld "$PRG"`
55 link=`expr "$ls" : '.*-> \(.*\)$'`
56 if expr "$link" : '/.*' > /dev/null; then
57 PRG="$link"
58 else
59 PRG=`dirname "$PRG"`"/$link"
60 fi
61 done
62 SAVED="`pwd`"
63 cd "`dirname \"$PRG\"`/" >&-
64 APP_HOME="`pwd -P`"
65 cd "$SAVED" >&-
66
67 CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68
69 # Determine the Java command to use to start the JVM.
70 if [ -n "$JAVA_HOME" ] ; then
71 if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 # IBM's JDK on AIX uses strange locations for the executables
73 JAVACMD="$JAVA_HOME/jre/sh/java"
74 else
75 JAVACMD="$JAVA_HOME/bin/java"
76 fi
77 if [ ! -x "$JAVACMD" ] ; then
78 die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79
80 Please set the JAVA_HOME variable in your environment to match the
81 location of your Java installation."
82 fi
83 else
84 JAVACMD="java"
85 which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86
87 Please set the JAVA_HOME variable in your environment to match the
88 location of your Java installation."
89 fi
90
91 # Increase the maximum file descriptors if we can.
92 if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
93 MAX_FD_LIMIT=`ulimit -H -n`
94 if [ $? -eq 0 ] ; then
95 if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 MAX_FD="$MAX_FD_LIMIT"
97 fi
98 ulimit -n $MAX_FD
99 if [ $? -ne 0 ] ; then
100 warn "Could not set maximum file descriptor limit: $MAX_FD"
101 fi
102 else
103 warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 fi
105 fi
106
107 # For Darwin, add options to specify how the application appears in the dock
108 if $darwin; then
109 GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 fi
111
112 # For Cygwin, switch paths to Windows format before running java
113 if $cygwin ; then
114 APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116
117 # We build the pattern for arguments to be converted via cygpath
118 ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
119 SEP=""
120 for dir in $ROOTDIRSRAW ; do
121 ROOTDIRS="$ROOTDIRS$SEP$dir"
122 SEP="|"
123 done
124 OURCYGPATTERN="(^($ROOTDIRS))"
125 # Add a user-defined pattern to the cygpath arguments
126 if [ "$GRADLE_CYGPATTERN" != "" ] ; then
127 OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
128 fi
129 # Now convert the arguments - kludge to limit ourselves to /bin/sh
130 i=0
131 for arg in "$@" ; do
132 CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
133 CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
134
135 if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
136 eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
137 else
138 eval `echo args$i`="\"$arg\""
139 fi
140 i=$((i+1))
141 done
142 case $i in
143 (0) set -- ;;
144 (1) set -- "$args0" ;;
145 (2) set -- "$args0" "$args1" ;;
146 (3) set -- "$args0" "$args1" "$args2" ;;
147 (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
148 (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
149 (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
150 (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
151 (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
152 (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
153 esac
154 fi
155
156 # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
157 function splitJvmOpts() {
158 JVM_OPTS=("$@")
159 }
160 eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
161 JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
162
163 exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
0 @if "%DEBUG%" == "" @echo off
1 @rem ##########################################################################
2 @rem
3 @rem Gradle startup script for Windows
4 @rem
5 @rem ##########################################################################
6
7 @rem Set local scope for the variables with windows NT shell
8 if "%OS%"=="Windows_NT" setlocal
9
10 @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
11 set DEFAULT_JVM_OPTS=
12
13 set DIRNAME=%~dp0
14 if "%DIRNAME%" == "" set DIRNAME=.
15 set APP_BASE_NAME=%~n0
16 set APP_HOME=%DIRNAME%
17
18 @rem Find java.exe
19 if defined JAVA_HOME goto findJavaFromJavaHome
20
21 set JAVA_EXE=java.exe
22 %JAVA_EXE% -version >NUL 2>&1
23 if "%ERRORLEVEL%" == "0" goto init
24
25 echo.
26 echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
27 echo.
28 echo Please set the JAVA_HOME variable in your environment to match the
29 echo location of your Java installation.
30
31 goto fail
32
33 :findJavaFromJavaHome
34 set JAVA_HOME=%JAVA_HOME:"=%
35 set JAVA_EXE=%JAVA_HOME%/bin/java.exe
36
37 if exist "%JAVA_EXE%" goto init
38
39 echo.
40 echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
41 echo.
42 echo Please set the JAVA_HOME variable in your environment to match the
43 echo location of your Java installation.
44
45 goto fail
46
47 :init
48 @rem Get command-line arguments, handling Windowz variants
49
50 if not "%OS%" == "Windows_NT" goto win9xME_args
51 if "%@eval[2+2]" == "4" goto 4NT_args
52
53 :win9xME_args
54 @rem Slurp the command line arguments.
55 set CMD_LINE_ARGS=
56 set _SKIP=2
57
58 :win9xME_args_slurp
59 if "x%~1" == "x" goto execute
60
61 set CMD_LINE_ARGS=%*
62 goto execute
63
64 :4NT_args
65 @rem Get arguments from the 4NT Shell from JP Software
66 set CMD_LINE_ARGS=%$
67
68 :execute
69 @rem Setup the command line
70
71 set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
72
73 @rem Execute Gradle
74 "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
75
76 :end
77 @rem End local scope for the variables with windows NT shell
78 if "%ERRORLEVEL%"=="0" goto mainEnd
79
80 :fail
81 rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 rem the _cmd.exe /c_ return code!
83 if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 exit /b 1
85
86 :mainEnd
87 if "%OS%"=="Windows_NT" endlocal
88
89 :omega