1e75ebbc8Sopenharmony_ci@rem 2e75ebbc8Sopenharmony_ci@rem Copyright 2015 the original author or authors. 3e75ebbc8Sopenharmony_ci@rem 4e75ebbc8Sopenharmony_ci@rem Licensed under the Apache License, Version 2.0 (the "License"); 5e75ebbc8Sopenharmony_ci@rem you may not use this file except in compliance with the License. 6e75ebbc8Sopenharmony_ci@rem You may obtain a copy of the License at 7e75ebbc8Sopenharmony_ci@rem 8e75ebbc8Sopenharmony_ci@rem https://www.apache.org/licenses/LICENSE-2.0 9e75ebbc8Sopenharmony_ci@rem 10e75ebbc8Sopenharmony_ci@rem Unless required by applicable law or agreed to in writing, software 11e75ebbc8Sopenharmony_ci@rem distributed under the License is distributed on an "AS IS" BASIS, 12e75ebbc8Sopenharmony_ci@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13e75ebbc8Sopenharmony_ci@rem See the License for the specific language governing permissions and 14e75ebbc8Sopenharmony_ci@rem limitations under the License. 15e75ebbc8Sopenharmony_ci@rem 16e75ebbc8Sopenharmony_ci 17e75ebbc8Sopenharmony_ci@if "%DEBUG%" == "" @echo off 18e75ebbc8Sopenharmony_ci@rem ########################################################################## 19e75ebbc8Sopenharmony_ci@rem 20e75ebbc8Sopenharmony_ci@rem Gradle startup script for Windows 21e75ebbc8Sopenharmony_ci@rem 22e75ebbc8Sopenharmony_ci@rem ########################################################################## 23e75ebbc8Sopenharmony_ci 24e75ebbc8Sopenharmony_ci@rem Set local scope for the variables with windows NT shell 25e75ebbc8Sopenharmony_ciif "%OS%"=="Windows_NT" setlocal 26e75ebbc8Sopenharmony_ci 27e75ebbc8Sopenharmony_ciset DIRNAME=%~dp0 28e75ebbc8Sopenharmony_ciif "%DIRNAME%" == "" set DIRNAME=. 29e75ebbc8Sopenharmony_ciset APP_BASE_NAME=%~n0 30e75ebbc8Sopenharmony_ciset APP_HOME=%DIRNAME% 31e75ebbc8Sopenharmony_ci 32e75ebbc8Sopenharmony_ci@rem Resolve any "." and ".." in APP_HOME to make it shorter. 33e75ebbc8Sopenharmony_cifor %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34e75ebbc8Sopenharmony_ci 35e75ebbc8Sopenharmony_ci@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36e75ebbc8Sopenharmony_ciset DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37e75ebbc8Sopenharmony_ci 38e75ebbc8Sopenharmony_ci@rem Find java.exe 39e75ebbc8Sopenharmony_ciif defined JAVA_HOME goto findJavaFromJavaHome 40e75ebbc8Sopenharmony_ci 41e75ebbc8Sopenharmony_ciset JAVA_EXE=java.exe 42e75ebbc8Sopenharmony_ci%JAVA_EXE% -version >NUL 2>&1 43e75ebbc8Sopenharmony_ciif "%ERRORLEVEL%" == "0" goto init 44e75ebbc8Sopenharmony_ci 45e75ebbc8Sopenharmony_ciecho. 46e75ebbc8Sopenharmony_ciecho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47e75ebbc8Sopenharmony_ciecho. 48e75ebbc8Sopenharmony_ciecho Please set the JAVA_HOME variable in your environment to match the 49e75ebbc8Sopenharmony_ciecho location of your Java installation. 50e75ebbc8Sopenharmony_ci 51e75ebbc8Sopenharmony_cigoto fail 52e75ebbc8Sopenharmony_ci 53e75ebbc8Sopenharmony_ci:findJavaFromJavaHome 54e75ebbc8Sopenharmony_ciset JAVA_HOME=%JAVA_HOME:"=% 55e75ebbc8Sopenharmony_ciset JAVA_EXE=%JAVA_HOME%/bin/java.exe 56e75ebbc8Sopenharmony_ci 57e75ebbc8Sopenharmony_ciif exist "%JAVA_EXE%" goto init 58e75ebbc8Sopenharmony_ci 59e75ebbc8Sopenharmony_ciecho. 60e75ebbc8Sopenharmony_ciecho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61e75ebbc8Sopenharmony_ciecho. 62e75ebbc8Sopenharmony_ciecho Please set the JAVA_HOME variable in your environment to match the 63e75ebbc8Sopenharmony_ciecho location of your Java installation. 64e75ebbc8Sopenharmony_ci 65e75ebbc8Sopenharmony_cigoto fail 66e75ebbc8Sopenharmony_ci 67e75ebbc8Sopenharmony_ci:init 68e75ebbc8Sopenharmony_ci@rem Get command-line arguments, handling Windows variants 69e75ebbc8Sopenharmony_ci 70e75ebbc8Sopenharmony_ciif not "%OS%" == "Windows_NT" goto win9xME_args 71e75ebbc8Sopenharmony_ci 72e75ebbc8Sopenharmony_ci:win9xME_args 73e75ebbc8Sopenharmony_ci@rem Slurp the command line arguments. 74e75ebbc8Sopenharmony_ciset CMD_LINE_ARGS= 75e75ebbc8Sopenharmony_ciset _SKIP=2 76e75ebbc8Sopenharmony_ci 77e75ebbc8Sopenharmony_ci:win9xME_args_slurp 78e75ebbc8Sopenharmony_ciif "x%~1" == "x" goto execute 79e75ebbc8Sopenharmony_ci 80e75ebbc8Sopenharmony_ciset CMD_LINE_ARGS=%* 81e75ebbc8Sopenharmony_ci 82e75ebbc8Sopenharmony_ci:execute 83e75ebbc8Sopenharmony_ci@rem Setup the command line 84e75ebbc8Sopenharmony_ci 85e75ebbc8Sopenharmony_ciset CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 86e75ebbc8Sopenharmony_ci 87e75ebbc8Sopenharmony_ci@rem Execute Gradle 88e75ebbc8Sopenharmony_ci"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 89e75ebbc8Sopenharmony_ci 90e75ebbc8Sopenharmony_ci:end 91e75ebbc8Sopenharmony_ci@rem End local scope for the variables with windows NT shell 92e75ebbc8Sopenharmony_ciif "%ERRORLEVEL%"=="0" goto mainEnd 93e75ebbc8Sopenharmony_ci 94e75ebbc8Sopenharmony_ci:fail 95e75ebbc8Sopenharmony_cirem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 96e75ebbc8Sopenharmony_cirem the _cmd.exe /c_ return code! 97e75ebbc8Sopenharmony_ciif not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 98e75ebbc8Sopenharmony_ciexit /b 1 99e75ebbc8Sopenharmony_ci 100e75ebbc8Sopenharmony_ci:mainEnd 101e75ebbc8Sopenharmony_ciif "%OS%"=="Windows_NT" endlocal 102e75ebbc8Sopenharmony_ci 103e75ebbc8Sopenharmony_ci:omega 104