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