diff --git a/build.gradle b/build.gradle index 229a369703..efada05429 100644 --- a/build.gradle +++ b/build.gradle @@ -233,5 +233,4 @@ dependsOnChildren() // 3) /wrapper which is a directory named by the "jarPath" config which contains other needed files. task wrapper(type: Wrapper) { gradleVersion = '0.9.2' - jarFile = 'wrapper' } diff --git a/gradlew b/gradlew index 1f3f3401fc..d8809f151d 100755 --- a/gradlew +++ b/gradlew @@ -7,21 +7,25 @@ ############################################################################## # Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together. -# GRADLE_OPTS="$GRADLE_OPTS -Xmx512" -# JAVA_OPTS="$JAVA_OPTS -Xmx512" +# GRADLE_OPTS="$GRADLE_OPTS -Xmx512m" +# JAVA_OPTS="$JAVA_OPTS -Xmx512m" GRADLE_APP_NAME=Gradle +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + warn ( ) { - echo "${PROGNAME}: $*" + echo "$*" } die ( ) { - warn "$*" + echo + echo "$*" + echo exit 1 } - # OS specific support (must be 'true' or 'false'). cygwin=false msys=false @@ -63,8 +67,8 @@ if $cygwin ; then fi STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain -CLASSPATH=`dirname "$0"`/wrapper/gradle-wrapper.jar -WRAPPER_PROPERTIES=`dirname "$0"`/wrapper/gradle-wrapper.properties +CLASSPATH=`dirname "$0"`/gradle/wrapper/gradle-wrapper.jar +WRAPPER_PROPERTIES=`dirname "$0"`/gradle/wrapper/gradle-wrapper.properties # Determine the Java command to use to start the JVM. if [ -z "$JAVACMD" ] ; then if [ -n "$JAVA_HOME" ] ; then @@ -79,12 +83,31 @@ if [ -z "$JAVACMD" ] ; then fi fi if [ ! -x "$JAVACMD" ] ; then - die "JAVA_HOME is not defined correctly, can not execute: $JAVACMD" + 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 if [ -z "$JAVA_HOME" ] ; then warn "JAVA_HOME environment variable is not set" fi +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + # For Darwin, add GRADLE_APP_NAME to the JAVA_OPTS as -Xdock:name if $darwin; then JAVA_OPTS="$JAVA_OPTS -Xdock:name=$GRADLE_APP_NAME" @@ -135,8 +158,11 @@ if $cygwin ; then esac fi -"$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \ +GRADLE_APP_BASE_NAME=`basename "$0"` + +exec "$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \ -classpath "$CLASSPATH" \ + -Dorg.gradle.appname="$GRADLE_APP_BASE_NAME" \ -Dorg.gradle.wrapper.properties="$WRAPPER_PROPERTIES" \ $STARTER_MAIN_CLASS \ "$@" diff --git a/gradlew.bat b/gradlew.bat index 644b918ee0..4855abb883 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -5,83 +5,39 @@ @rem ## @rem ########################################################################## -@rem -@rem $Revision: 10602 $ $Date: 2008-01-25 02:49:54 +0100 (ven., 25 janv. 2008) $ -@rem - @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal @rem Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together. -@rem set GRADLE_OPTS=%GRADLE_OPTS% -Xmx512 -@rem set JAVA_OPTS=%JAVA_OPTS% -Xmx512 +@rem set GRADLE_OPTS=%GRADLE_OPTS% -Xmx512m +@rem set JAVA_OPTS=%JAVA_OPTS% -Xmx512m set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=.\ -@rem Determine the command interpreter to execute the "CD" later -set COMMAND_COM="cmd.exe" -if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe" -if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com" +@rem Find java.exe +set JAVA_EXE=java.exe +if not defined JAVA_HOME goto init -@rem Use explicit find.exe to prevent cygwin and others find.exe from being used -set FIND_EXE="find.exe" -if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe" -if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe" +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe -:check_JAVA_HOME -@rem Make sure we have a valid JAVA_HOME -if not "%JAVA_HOME%" == "" goto have_JAVA_HOME +if exist "%JAVA_EXE%" goto init echo. -echo ERROR: Environment variable JAVA_HOME has not been set. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. echo. goto end -:have_JAVA_HOME -@rem Validate JAVA_HOME -%COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul -if not errorlevel 1 goto init - -echo. -echo ERROR: JAVA_HOME might be set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation if there are problems. -echo. - :init -@rem get name of script to launch with full path @rem Get command-line arguments, handling Windowz variants -SET _marker=%JAVA_HOME: =% -@rem IF NOT "%_marker%" == "%JAVA_HOME%" ECHO JAVA_HOME "%JAVA_HOME%" contains spaces. Please change to a location without spaces if this causes problems. if not "%OS%" == "Windows_NT" goto win9xME_args if "%eval[2+2]" == "4" goto 4NT_args -IF "%_marker%" == "%JAVA_HOME%" goto :win9xME_args - -set _FIXPATH= -call :fixpath "%JAVA_HOME%" -set JAVA_HOME=%_FIXPATH:~1% - -goto win9xME_args - -:fixpath -if not %1.==. ( -for /f "tokens=1* delims=;" %%a in (%1) do ( -call :shortfilename "%%a" & call :fixpath "%%b" -) -) -goto :EOF -:shortfilename -for %%i in (%1) do set _FIXPATH=%_FIXPATH%;%%~fsi -goto :EOF - - :win9xME_args @rem Slurp the command line arguments. set CMD_LINE_ARGS= @@ -101,12 +57,12 @@ set CMD_LINE_ARGS=%$ @rem Setup the command line set STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain -set CLASSPATH=%DIRNAME%\wrapper\gradle-wrapper.jar -set WRAPPER_PROPERTIES=%DIRNAME%\wrapper\gradle-wrapper.properties -set JAVA_EXE=%JAVA_HOME%\bin\java.exe +set CLASSPATH=%DIRNAME%\gradle\wrapper\gradle-wrapper.jar +set WRAPPER_PROPERTIES=%DIRNAME%\gradle\wrapper\gradle-wrapper.properties set GRADLE_OPTS=%JAVA_OPTS% %GRADLE_OPTS% -Dorg.gradle.wrapper.properties="%WRAPPER_PROPERTIES%" +@rem Execute Gradle "%JAVA_EXE%" %GRADLE_OPTS% -classpath "%CLASSPATH%" %STARTER_MAIN_CLASS% %CMD_LINE_ARGS% :end diff --git a/wrapper/gradle-wrapper.jar b/wrapper/gradle-wrapper.jar deleted file mode 100644 index 14e0c25ffc..0000000000 Binary files a/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/wrapper/gradle-wrapper.properties b/wrapper/gradle-wrapper.properties deleted file mode 100644 index 86a58f8137..0000000000 --- a/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Oct 11 07:41:33 CDT 2010 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -distributionVersion=0.9-rc-3 -zipStorePath=wrapper/dists -urlRoot=http\://dist.codehaus.org/gradle -distributionName=gradle -distributionClassifier=bin