-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.cmd
41 lines (31 loc) · 812 Bytes
/
Build.cmd
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
37
38
39
40
41
@echo off
echo Set build information for Java client...
set PROJECT=GeoIP
set PACKAGE=geoip
set ENTRY=Main
if exist Release (
echo Cleaning up old release files...
rd /s /q Release
)
set STATUS=complete
set JV=8
call :Build
set JV=17
call :Build
echo Build %STATUS%
exit /b
:Build
echo Compiling source files to Java %JV%...
if %JV% leq 8 (javac -d Release\%JV% src\%PACKAGE%\*.java --release %JV%
) else javac -d Release\%JV% src\%PACKAGE%\*.java src\module-info.java --release %JV%
if %ERRORLEVEL% neq 0 (
echo Compile error
set STATUS=incomplete
exit /b
)
echo Archiving to Java %JV% jar file...
cd Release\%JV%
if %JV% leq 8 (jar cfe %PROJECT%-%JV%.jar %PACKAGE%.%ENTRY% %PACKAGE%\*.class
) else jar cfe %PROJECT%-%JV%.jar %PACKAGE%.%ENTRY% %PACKAGE%\*.class module-info.class
cd ..\..
exit /b