-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup_and_build.bat
More file actions
66 lines (57 loc) · 1.7 KB
/
setup_and_build.bat
File metadata and controls
66 lines (57 loc) · 1.7 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@echo off
echo === WalletConnect V2 DApp Setup Script ===
echo Checking Java installation...
java -version >nul 2>&1
if %errorlevel% neq 0 (
echo Java is not installed or not in PATH.
echo.
echo Please follow these steps to install Java JDK 17:
echo 1. Download Java JDK 17 from: https://adoptium.net/temurin/releases/?version=17
echo 2. Install the downloaded .exe file
echo 3. Set JAVA_HOME environment variable:
echo - Press Win+R, type 'sysdm.cpl', press Enter
echo - Go to Advanced tab → Environment Variables
echo - Under System Variables, click New
echo - Variable name: JAVA_HOME
echo - Variable value: C:\Program Files\Eclipse Adoptium\jdk-17.x.x-hotspot
echo 4. Add %%JAVA_HOME%%\bin to your PATH variable
echo 5. Restart your terminal and run this script again
echo.
pause
exit /b 1
)
echo Java is installed:
java -version
echo.
echo Checking JAVA_HOME...
if "%JAVA_HOME%"=="" (
echo JAVA_HOME is not set. Please set it to your Java installation directory.
echo Example: C:\Program Files\Eclipse Adoptium\jdk-17.x.x-hotspot
echo.
pause
exit /b 1
)
echo JAVA_HOME is set to: %JAVA_HOME%
echo.
echo Cleaning project...
gradlew clean
echo.
echo Building project...
gradlew build
if %errorlevel% equ 0 (
echo.
echo Build successful!
echo.
echo To run the app:
echo 1. Connect an Android device or start an emulator
echo 2. Run: gradlew installDebug
echo.
echo To generate APK for deployment:
echo Run: gradlew assembleDebug
echo APK will be generated in: app\build\outputs\apk\debug\
) else (
echo.
echo Build failed! Please check the error messages above.
)
echo.
pause