Mercurial > jhg
comparison gradlew.bat @ 213:6ec4af642ba8 gradle
Project uses Gradle for build - actual changes
author | Alexander Kitaev <kitaev@gmail.com> |
---|---|
date | Tue, 10 May 2011 10:52:53 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
212:edb2e2829352 | 213:6ec4af642ba8 |
---|---|
1 @if "%DEBUG%" == "" @echo off | |
2 @rem ########################################################################## | |
3 @rem ## | |
4 @rem Gradle startup script for Windows ## | |
5 @rem ## | |
6 @rem ########################################################################## | |
7 | |
8 @rem Set local scope for the variables with windows NT shell | |
9 if "%OS%"=="Windows_NT" setlocal | |
10 | |
11 @rem Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together. | |
12 @rem set GRADLE_OPTS=%GRADLE_OPTS% -Xmx512m | |
13 @rem set JAVA_OPTS=%JAVA_OPTS% -Xmx512m | |
14 | |
15 set DIRNAME=%~dp0 | |
16 if "%DIRNAME%" == "" set DIRNAME=.\ | |
17 | |
18 @rem Find java.exe | |
19 set JAVA_EXE=java.exe | |
20 if not defined JAVA_HOME goto init | |
21 | |
22 set JAVA_HOME=%JAVA_HOME:"=% | |
23 set JAVA_EXE=%JAVA_HOME%/bin/java.exe | |
24 | |
25 if exist "%JAVA_EXE%" goto init | |
26 | |
27 echo. | |
28 echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% | |
29 echo. | |
30 echo Please set the JAVA_HOME variable in your environment to match the | |
31 echo location of your Java installation. | |
32 echo. | |
33 goto end | |
34 | |
35 :init | |
36 @rem Get command-line arguments, handling Windowz variants | |
37 | |
38 if not "%OS%" == "Windows_NT" goto win9xME_args | |
39 if "%eval[2+2]" == "4" goto 4NT_args | |
40 | |
41 :win9xME_args | |
42 @rem Slurp the command line arguments. | |
43 set CMD_LINE_ARGS= | |
44 set _SKIP=2 | |
45 | |
46 :win9xME_args_slurp | |
47 if "x%~1" == "x" goto execute | |
48 | |
49 set CMD_LINE_ARGS=%* | |
50 goto execute | |
51 | |
52 :4NT_args | |
53 @rem Get arguments from the 4NT Shell from JP Software | |
54 set CMD_LINE_ARGS=%$ | |
55 | |
56 :execute | |
57 @rem Setup the command line | |
58 | |
59 set STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain | |
60 set CLASSPATH=%DIRNAME%\gradle\wrapper\gradle-wrapper.jar | |
61 set WRAPPER_PROPERTIES=%DIRNAME%\gradle\wrapper\gradle-wrapper.properties | |
62 | |
63 set GRADLE_OPTS=%JAVA_OPTS% %GRADLE_OPTS% -Dorg.gradle.wrapper.properties="%WRAPPER_PROPERTIES%" | |
64 | |
65 @rem Execute Gradle | |
66 "%JAVA_EXE%" %GRADLE_OPTS% -classpath "%CLASSPATH%" %STARTER_MAIN_CLASS% %CMD_LINE_ARGS% | |
67 | |
68 :end | |
69 @rem End local scope for the variables with windows NT shell | |
70 if "%ERRORLEVEL%"=="0" goto mainEnd | |
71 | |
72 if not "%OS%"=="Windows_NT" echo 1 > nul | choice /n /c:1 | |
73 | |
74 rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of | |
75 rem the _cmd.exe /c_ return code! | |
76 if not "" == "%GRADLE_EXIT_CONSOLE%" exit "%ERRORLEVEL%" | |
77 exit /b "%ERRORLEVEL%" | |
78 | |
79 :mainEnd | |
80 if "%OS%"=="Windows_NT" endlocal | |
81 | |
82 :omega |