|
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 | | -set DIRNAME=%~dp0 |
12 | | -if "%DIRNAME%" == "" set DIRNAME=. |
13 | | -set APP_BASE_NAME=%~n0 |
14 | | -set APP_HOME=%DIRNAME% |
15 | | - |
16 | | -@rem Resolve any "." and ".." in APP_HOME to make it shorter. |
17 | | -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi |
18 | | - |
19 | | -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. |
20 | | -set DEFAULT_JVM_OPTS= |
21 | | - |
22 | | -@rem Find java.exe |
23 | | -if defined JAVA_HOME goto findJavaFromJavaHome |
24 | | - |
25 | | -set JAVA_EXE=java.exe |
26 | | -%JAVA_EXE% -version >NUL 2>&1 |
27 | | -if "%ERRORLEVEL%" == "0" goto init |
28 | | - |
29 | | -echo. |
30 | | -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. |
31 | | -echo. |
32 | | -echo Please set the JAVA_HOME variable in your environment to match the |
33 | | -echo location of your Java installation. |
34 | | - |
35 | | -goto fail |
36 | | - |
37 | | -:findJavaFromJavaHome |
38 | | -set JAVA_HOME=%JAVA_HOME:"=% |
39 | | -set JAVA_EXE=%JAVA_HOME%/bin/java.exe |
40 | | - |
41 | | -if exist "%JAVA_EXE%" goto init |
42 | | - |
43 | | -echo. |
44 | | -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% |
45 | | -echo. |
46 | | -echo Please set the JAVA_HOME variable in your environment to match the |
47 | | -echo location of your Java installation. |
48 | | - |
49 | | -goto fail |
50 | | - |
51 | | -:init |
52 | | -@rem Get command-line arguments, handling Windows variants |
53 | | - |
54 | | -if not "%OS%" == "Windows_NT" goto win9xME_args |
55 | | - |
56 | | -:win9xME_args |
57 | | -@rem Slurp the command line arguments. |
58 | | -set CMD_LINE_ARGS= |
59 | | -set _SKIP=2 |
60 | | - |
61 | | -:win9xME_args_slurp |
62 | | -if "x%~1" == "x" goto execute |
63 | | - |
64 | | -set CMD_LINE_ARGS=%* |
65 | | - |
66 | | -:execute |
67 | | -@rem Setup the command line |
68 | | - |
69 | | -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar |
70 | | - |
71 | | -@rem Execute Gradle |
72 | | -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% |
73 | | - |
74 | | -:end |
75 | | -@rem End local scope for the variables with windows NT shell |
76 | | -if "%ERRORLEVEL%"=="0" goto mainEnd |
77 | | - |
78 | | -:fail |
79 | | -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of |
80 | | -rem the _cmd.exe /c_ return code! |
81 | | -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 |
82 | | -exit /b 1 |
83 | | - |
84 | | -:mainEnd |
85 | | -if "%OS%"=="Windows_NT" endlocal |
86 | | - |
87 | | -:omega |
| 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 | +set DIRNAME=%~dp0 |
| 12 | +if "%DIRNAME%" == "" set DIRNAME=. |
| 13 | +set APP_BASE_NAME=%~n0 |
| 14 | +set APP_HOME=%DIRNAME% |
| 15 | + |
| 16 | +@rem Resolve any "." and ".." in APP_HOME to make it shorter. |
| 17 | +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi |
| 18 | + |
| 19 | +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. |
| 20 | +set DEFAULT_JVM_OPTS= |
| 21 | + |
| 22 | +@rem Find java.exe |
| 23 | +if defined JAVA_HOME goto findJavaFromJavaHome |
| 24 | + |
| 25 | +set JAVA_EXE=java.exe |
| 26 | +%JAVA_EXE% -version >NUL 2>&1 |
| 27 | +if "%ERRORLEVEL%" == "0" goto init |
| 28 | + |
| 29 | +echo. |
| 30 | +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. |
| 31 | +echo. |
| 32 | +echo Please set the JAVA_HOME variable in your environment to match the |
| 33 | +echo location of your Java installation. |
| 34 | + |
| 35 | +goto fail |
| 36 | + |
| 37 | +:findJavaFromJavaHome |
| 38 | +set JAVA_HOME=%JAVA_HOME:"=% |
| 39 | +set JAVA_EXE=%JAVA_HOME%/bin/java.exe |
| 40 | + |
| 41 | +if exist "%JAVA_EXE%" goto init |
| 42 | + |
| 43 | +echo. |
| 44 | +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% |
| 45 | +echo. |
| 46 | +echo Please set the JAVA_HOME variable in your environment to match the |
| 47 | +echo location of your Java installation. |
| 48 | + |
| 49 | +goto fail |
| 50 | + |
| 51 | +:init |
| 52 | +@rem Get command-line arguments, handling Windows variants |
| 53 | + |
| 54 | +if not "%OS%" == "Windows_NT" goto win9xME_args |
| 55 | + |
| 56 | +:win9xME_args |
| 57 | +@rem Slurp the command line arguments. |
| 58 | +set CMD_LINE_ARGS= |
| 59 | +set _SKIP=2 |
| 60 | + |
| 61 | +:win9xME_args_slurp |
| 62 | +if "x%~1" == "x" goto execute |
| 63 | + |
| 64 | +set CMD_LINE_ARGS=%* |
| 65 | + |
| 66 | +:execute |
| 67 | +@rem Setup the command line |
| 68 | + |
| 69 | +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar |
| 70 | + |
| 71 | +@rem Execute Gradle |
| 72 | +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% |
| 73 | + |
| 74 | +:end |
| 75 | +@rem End local scope for the variables with windows NT shell |
| 76 | +if "%ERRORLEVEL%"=="0" goto mainEnd |
| 77 | + |
| 78 | +:fail |
| 79 | +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of |
| 80 | +rem the _cmd.exe /c_ return code! |
| 81 | +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 |
| 82 | +exit /b 1 |
| 83 | + |
| 84 | +:mainEnd |
| 85 | +if "%OS%"=="Windows_NT" endlocal |
| 86 | + |
| 87 | +:omega |
0 commit comments