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