194599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver@if "%DEBUG%" == "" @echo off
294599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver@rem ##########################################################################
394599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver@rem
494599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver@rem  Gradle startup script for Windows
594599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver@rem
694599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver@rem ##########################################################################
794599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
894599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver@rem Set local scope for the variables with windows NT shell
994599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverif "%OS%"=="Windows_NT" setlocal
1094599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
1194599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
1294599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverset DEFAULT_JVM_OPTS=
1394599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
1494599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverset DIRNAME=%~dp0
1594599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverif "%DIRNAME%" == "" set DIRNAME=.
1694599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverset APP_BASE_NAME=%~n0
1794599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverset APP_HOME=%DIRNAME%
1894599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
1994599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver@rem Find java.exe
2094599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverif defined JAVA_HOME goto findJavaFromJavaHome
2194599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
2294599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverset JAVA_EXE=java.exe
2394599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver%JAVA_EXE% -version >NUL 2>&1
2494599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverif "%ERRORLEVEL%" == "0" goto init
2594599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
2694599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverecho.
2794599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverecho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
2894599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverecho.
2994599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverecho Please set the JAVA_HOME variable in your environment to match the
3094599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverecho location of your Java installation.
3194599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
3294599babbb437dd6bbd51d61dce42b57b71d88deBen Gruvergoto fail
3394599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
3494599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver:findJavaFromJavaHome
3594599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverset JAVA_HOME=%JAVA_HOME:"=%
3694599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverset JAVA_EXE=%JAVA_HOME%/bin/java.exe
3794599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
3894599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverif exist "%JAVA_EXE%" goto init
3994599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
4094599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverecho.
4194599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverecho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
4294599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverecho.
4394599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverecho Please set the JAVA_HOME variable in your environment to match the
4494599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverecho location of your Java installation.
4594599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
4694599babbb437dd6bbd51d61dce42b57b71d88deBen Gruvergoto fail
4794599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
4894599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver:init
4994599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver@rem Get command-line arguments, handling Windowz variants
5094599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
5194599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverif not "%OS%" == "Windows_NT" goto win9xME_args
5294599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverif "%@eval[2+2]" == "4" goto 4NT_args
5394599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
5494599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver:win9xME_args
5594599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver@rem Slurp the command line arguments.
5694599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverset CMD_LINE_ARGS=
5794599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverset _SKIP=2
5894599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
5994599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver:win9xME_args_slurp
6094599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverif "x%~1" == "x" goto execute
6194599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
6294599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverset CMD_LINE_ARGS=%*
6394599babbb437dd6bbd51d61dce42b57b71d88deBen Gruvergoto execute
6494599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
6594599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver:4NT_args
6694599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver@rem Get arguments from the 4NT Shell from JP Software
6794599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverset CMD_LINE_ARGS=%$
6894599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
6994599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver:execute
7094599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver@rem Setup the command line
7194599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
7294599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverset CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
7394599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
7494599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver@rem Execute Gradle
7594599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
7694599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
7794599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver:end
7894599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver@rem End local scope for the variables with windows NT shell
7994599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverif "%ERRORLEVEL%"=="0" goto mainEnd
8094599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
8194599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver:fail
8294599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
8394599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverrem the _cmd.exe /c_ return code!
8494599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverif  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
8594599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverexit /b 1
8694599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
8794599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver:mainEnd
8894599babbb437dd6bbd51d61dce42b57b71d88deBen Gruverif "%OS%"=="Windows_NT" endlocal
8994599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver
9094599babbb437dd6bbd51d61dce42b57b71d88deBen Gruver:omega
91