87 lines
1.8 KiB
Markdown
87 lines
1.8 KiB
Markdown
# Build Commands
|
|
|
|
## Android (Gradle)
|
|
|
|
```bash
|
|
# Build entire project
|
|
./gradlew build
|
|
|
|
# Build debug APK
|
|
./gradlew assembleDebug
|
|
|
|
# Build release APK
|
|
./gradlew assembleRelease
|
|
|
|
# Clean build outputs
|
|
./gradlew clean
|
|
|
|
# Build with verbose output
|
|
./gradlew build --info --stacktrace
|
|
|
|
# Run lint checks
|
|
./gradlew lint
|
|
|
|
# Run unit tests
|
|
./gradlew test
|
|
|
|
# Run connected device tests
|
|
./gradlew connectedAndroidTest
|
|
```
|
|
|
|
## Desktop Designer (CMake)
|
|
|
|
```bash
|
|
# Configure (from designer/ folder)
|
|
cmake -B build -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake
|
|
|
|
# Build
|
|
cmake --build build --config Debug
|
|
|
|
# Run with hot-reload
|
|
./build/Debug/mosis-designer.exe ../src/main/assets/apps/home/home.rml
|
|
|
|
# Run with logging and hierarchy dump
|
|
./build/Debug/mosis-designer.exe ../src/main/assets/apps/home/home.rml --log output.log --hierarchy hierarchy.json
|
|
```
|
|
|
|
## Designer Tests (CMake)
|
|
|
|
```bash
|
|
# Configure (from designer-test/ folder)
|
|
cmake -B build -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake
|
|
|
|
# Build
|
|
cmake --build build --config Debug
|
|
|
|
# Run tests
|
|
./build/Debug/designer-test.exe
|
|
```
|
|
|
|
## Sandbox Security Tests (CMake)
|
|
|
|
```bash
|
|
# Configure (from sandbox-test/ folder)
|
|
cmake -B build -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake
|
|
|
|
# Build
|
|
cmake --build build --config Debug
|
|
|
|
# Run all tests (uber command)
|
|
./run_tests.bat
|
|
|
|
# Or run directly
|
|
./build/Debug/sandbox-test.exe
|
|
|
|
# Run specific test
|
|
./build/Debug/sandbox-test.exe --test DangerousGlobals
|
|
./build/Debug/sandbox-test.exe --test Memory
|
|
./build/Debug/sandbox-test.exe --test CPU
|
|
```
|
|
|
|
## Environment Requirements
|
|
|
|
Required environment variables:
|
|
- `ANDROID_HOME` - Android SDK path
|
|
- `ANDROID_NDK_HOME` - Android NDK path (version 29.0.14206865)
|
|
- `VCPKG_ROOT` - vcpkg package manager root
|