forked from vividus-framework/vividus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgradlew.bat
36 lines (30 loc) · 961 Bytes
/
gradlew.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@echo off
set GRADLE_PROPERTIES=gradle.properties
set ERROR_MSG=%GRADLE_PROPERTIES% file is missing
if exist %GRADLE_PROPERTIES% goto readproperties
goto fail
:readproperties
call :setpropertyvalue buildSystemVersion , buildSystemVersion
:checkpath
if not exist "%BUILD_SYSTEM_ROOT%" (
call :setpropertyvalue buildSystemRootDir , BUILD_SYSTEM_ROOT
)
set GRADLEW_PATH=%BUILD_SYSTEM_ROOT%\%buildSystemVersion%\gradlew.bat
if exist "%GRADLEW_PATH%" goto call
set ERROR_MSG=Couldn't find %GRADLEW_PATH%. Check BUILD_SYSTEM_ROOT and buildSystemVersion set correctly
:fail
echo.
echo ERROR: %ERROR_MSG%
echo.
echo Please check Build System guide:
echo https://github.com/vividus-framework/vividus-build-system
echo or
echo clone this repo recursively: git clone --recursive <git-repository-url>
exit /b 1
:call
@CALL "%GRADLEW_PATH%" %*
exit /b 0
:setpropertyvalue
For /F "tokens=1* delims==" %%A IN (%GRADLE_PROPERTIES%) DO (
IF %%A==%~1 set %~2=%%B
)