gradlew.bat 2.3 KB

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