simple_mtglife

annotate android/gradlew.bat @ 6:9e3e14ed98eb

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