Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 126 lines (96 sloc) 4.046 kb
248ef97 @sebersole HHH-5616 - Switch to Gradle for builds .. gradlew
sebersole authored
1 @if "%DEBUG%" == "" @echo off
2 @rem ##########################################################################
3 @rem ##
4 @rem Gradle startup script for Windows ##
5 @rem ##
6 @rem ##########################################################################
7
8 @rem
9 @rem $Revision: 10602 $ $Date: 2008-01-25 02:49:54 +0100 (ven., 25 janv. 2008) $
10 @rem
11
12 @rem Set local scope for the variables with windows NT shell
13 if "%OS%"=="Windows_NT" setlocal
14
15 @rem Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
16 @rem set GRADLE_OPTS=%GRADLE_OPTS% -Xmx512
17 @rem set JAVA_OPTS=%JAVA_OPTS% -Xmx512
18
19 set DIRNAME=%~dp0
20 if "%DIRNAME%" == "" set DIRNAME=.\
21
22 @rem Determine the command interpreter to execute the "CD" later
23 set COMMAND_COM="cmd.exe"
24 if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe"
25 if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com"
26
27 @rem Use explicit find.exe to prevent cygwin and others find.exe from being used
28 set FIND_EXE="find.exe"
29 if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe"
30 if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe"
31
32 :check_JAVA_HOME
33 @rem Make sure we have a valid JAVA_HOME
34 if not "%JAVA_HOME%" == "" goto have_JAVA_HOME
35
36 echo.
37 echo ERROR: Environment variable JAVA_HOME has not been set.
38 echo.
39 echo Please set the JAVA_HOME variable in your environment to match the
40 echo location of your Java installation.
41 echo.
42 goto end
43
44 :have_JAVA_HOME
45 @rem Validate JAVA_HOME
46 %COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul
47 if not errorlevel 1 goto init
48
49 echo.
50 echo ERROR: JAVA_HOME might be set to an invalid directory: %JAVA_HOME%
51 echo.
52 echo Please set the JAVA_HOME variable in your environment to match the
53 echo location of your Java installation if there are problems.
54 echo.
55
56 :init
57 @rem get name of script to launch with full path
58 @rem Get command-line arguments, handling Windowz variants
59 SET _marker=%JAVA_HOME: =%
60 @rem IF NOT "%_marker%" == "%JAVA_HOME%" ECHO JAVA_HOME "%JAVA_HOME%" contains spaces. Please change to a location without spaces if this causes problems.
61
62 if not "%OS%" == "Windows_NT" goto win9xME_args
63 if "%eval[2+2]" == "4" goto 4NT_args
64
65 IF "%_marker%" == "%JAVA_HOME%" goto :win9xME_args
66
67 set _FIXPATH=
68 call :fixpath "%JAVA_HOME%"
69 set JAVA_HOME=%_FIXPATH:~1%
70
71 goto win9xME_args
72
73 :fixpath
74 if not %1.==. (
75 for /f "tokens=1* delims=;" %%a in (%1) do (
76 call :shortfilename "%%a" & call :fixpath "%%b"
77 )
78 )
79 goto :EOF
80 :shortfilename
81 for %%i in (%1) do set _FIXPATH=%_FIXPATH%;%%~fsi
82 goto :EOF
83
84
85 :win9xME_args
86 @rem Slurp the command line arguments.
87 set CMD_LINE_ARGS=
88 set _SKIP=2
89
90 :win9xME_args_slurp
91 if "x%~1" == "x" goto execute
92
93 set CMD_LINE_ARGS=%*
94 goto execute
95
96 :4NT_args
97 @rem Get arguments from the 4NT Shell from JP Software
98 set CMD_LINE_ARGS=%$
99
100 :execute
101 @rem Setup the command line
102
103 set STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain
104 set CLASSPATH=%DIRNAME%\wrapper\gradle-wrapper.jar
105 set WRAPPER_PROPERTIES=%DIRNAME%\wrapper\gradle-wrapper.properties
106 set JAVA_EXE=%JAVA_HOME%\bin\java.exe
107
108 set GRADLE_OPTS=%JAVA_OPTS% %GRADLE_OPTS% -Dorg.gradle.wrapper.properties="%WRAPPER_PROPERTIES%"
109
110 "%JAVA_EXE%" %GRADLE_OPTS% -classpath "%CLASSPATH%" %STARTER_MAIN_CLASS% %CMD_LINE_ARGS%
111
112 :end
113 @rem End local scope for the variables with windows NT shell
114 if "%ERRORLEVEL%"=="0" goto mainEnd
115
116 if not "%OS%"=="Windows_NT" echo 1 > nul | choice /n /c:1
117
118 rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
119 rem the _cmd.exe /c_ return code!
120 if not "" == "%GRADLE_EXIT_CONSOLE%" exit "%ERRORLEVEL%"
121 exit /b "%ERRORLEVEL%"
122
123 :mainEnd
124 if "%OS%"=="Windows_NT" endlocal
125
126 :omega
Something went wrong with that request. Please try again.