universe@147: @rem universe@147: @rem Copyright 2015 the original author or authors. universe@147: @rem universe@147: @rem Licensed under the Apache License, Version 2.0 (the "License"); universe@147: @rem you may not use this file except in compliance with the License. universe@147: @rem You may obtain a copy of the License at universe@147: @rem universe@147: @rem https://www.apache.org/licenses/LICENSE-2.0 universe@147: @rem universe@147: @rem Unless required by applicable law or agreed to in writing, software universe@147: @rem distributed under the License is distributed on an "AS IS" BASIS, universe@147: @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. universe@147: @rem See the License for the specific language governing permissions and universe@147: @rem limitations under the License. universe@147: @rem universe@147: universe@147: @if "%DEBUG%" == "" @echo off universe@147: @rem ########################################################################## universe@147: @rem universe@147: @rem Gradle startup script for Windows universe@147: @rem universe@147: @rem ########################################################################## universe@147: universe@147: @rem Set local scope for the variables with windows NT shell universe@147: if "%OS%"=="Windows_NT" setlocal universe@147: universe@147: set DIRNAME=%~dp0 universe@147: if "%DIRNAME%" == "" set DIRNAME=. universe@147: set APP_BASE_NAME=%~n0 universe@147: set APP_HOME=%DIRNAME% universe@147: universe@147: @rem Resolve any "." and ".." in APP_HOME to make it shorter. universe@147: for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi universe@147: universe@147: @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. universe@147: set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" universe@147: universe@147: @rem Find java.exe universe@147: if defined JAVA_HOME goto findJavaFromJavaHome universe@147: universe@147: set JAVA_EXE=java.exe universe@147: %JAVA_EXE% -version >NUL 2>&1 universe@147: if "%ERRORLEVEL%" == "0" goto init universe@147: universe@147: echo. universe@147: echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. universe@147: echo. universe@147: echo Please set the JAVA_HOME variable in your environment to match the universe@147: echo location of your Java installation. universe@147: universe@147: goto fail universe@147: universe@147: :findJavaFromJavaHome universe@147: set JAVA_HOME=%JAVA_HOME:"=% universe@147: set JAVA_EXE=%JAVA_HOME%/bin/java.exe universe@147: universe@147: if exist "%JAVA_EXE%" goto init universe@147: universe@147: echo. universe@147: echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% universe@147: echo. universe@147: echo Please set the JAVA_HOME variable in your environment to match the universe@147: echo location of your Java installation. universe@147: universe@147: goto fail universe@147: universe@147: :init universe@147: @rem Get command-line arguments, handling Windows variants universe@147: universe@147: if not "%OS%" == "Windows_NT" goto win9xME_args universe@147: universe@147: :win9xME_args universe@147: @rem Slurp the command line arguments. universe@147: set CMD_LINE_ARGS= universe@147: set _SKIP=2 universe@147: universe@147: :win9xME_args_slurp universe@147: if "x%~1" == "x" goto execute universe@147: universe@147: set CMD_LINE_ARGS=%* universe@147: universe@147: :execute universe@147: @rem Setup the command line universe@147: universe@147: set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar universe@147: universe@147: @rem Execute Gradle universe@147: "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% universe@147: universe@147: :end universe@147: @rem End local scope for the variables with windows NT shell universe@147: if "%ERRORLEVEL%"=="0" goto mainEnd universe@147: universe@147: :fail universe@147: rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of universe@147: rem the _cmd.exe /c_ return code! universe@147: if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 universe@147: exit /b 1 universe@147: universe@147: :mainEnd universe@147: if "%OS%"=="Windows_NT" endlocal universe@147: universe@147: :omega