Files
SilverDROID/BUILD.md
SysAdmin c667765488 SilverDROID - Dark Side Admin with CI/CD pipeline
- Android PWA/WASM launcher with glassmorphism UI
- Loads https://admin.dark.side directly on launch
- Complete GitLab CI/CD pipeline configuration
- Automated builds for Debug, Release, and AAB
- Full WASM support with optimized WebView
- Material Design 3 theme
- Comprehensive documentation

Features:
- Auto-load target URL on app launch
- Glassmorphism components (frosted glass effects)
- Full PWA/WASM support
- Room database for future extensions
- Jetpack Compose UI
- CI/CD with artifact storage

Built for SilverLABS
2025-09-30 17:13:14 +01:00

170 lines
3.2 KiB
Markdown

# Build Instructions for SilverDROID
## Quick Start (Windows)
### From WSL/Linux:
```bash
cd /mnt/c/Production/Source/SilverLABS/SilverDROID
# Build debug APK
./gradlew assembleDebug
# Install on connected device
./gradlew installDebug
```
### From Windows PowerShell:
```powershell
cd C:\Production\Source\SilverLABS\SilverDROID
# Build debug APK
.\gradlew.bat assembleDebug
# Install on connected device
.\gradlew.bat installDebug
```
## Android Studio Setup
1. **Open Project**
- Launch Android Studio
- File → Open → Navigate to `SilverDROID` folder
- Wait for Gradle sync to complete
2. **Connect Device or Emulator**
- Physical Device: Enable USB debugging in Developer Options
- Emulator: Create an AVD with Android 8.0+ (API 26+)
3. **Run the App**
- Click the green ▶️ (Run) button
- Select your device/emulator
- Wait for build and install
## Build Variants
### Debug Build (Development)
```bash
./gradlew assembleDebug
# Output: app/build/outputs/apk/debug/app-debug.apk
```
Features:
- WebView debugging enabled
- No code obfuscation
- Faster build times
- Debug logging
### Release Build (Production)
```bash
./gradlew assembleRelease
# Output: app/build/outputs/apk/release/app-release.apk
```
Features:
- Code obfuscation (ProGuard)
- Optimized APK size
- Production-ready
## Gradle Tasks
```bash
# Clean build files
./gradlew clean
# Build both debug and release
./gradlew assemble
# Run unit tests
./gradlew test
# Generate test coverage report
./gradlew jacocoTestReport
# Lint check
./gradlew lint
# List all tasks
./gradlew tasks
```
## Android Bundle (AAB)
For Google Play Store submission:
```bash
./gradlew bundleRelease
# Output: app/build/outputs/bundle/release/app-release.aab
```
## Troubleshooting
### Gradle Sync Failed
1. Check internet connection
2. Update Android Studio
3. Invalidate caches: File → Invalidate Caches / Restart
### Build Failed
1. Clean project: `./gradlew clean`
2. Check JDK version (must be JDK 17)
3. Update Android SDK via SDK Manager
### Device Not Detected
1. Enable USB debugging on device
2. Install device drivers (Windows)
3. Check `adb devices` command
4. Try different USB cable/port
### Out of Memory
Increase Gradle memory in `gradle.properties`:
```properties
org.gradle.jvmargs=-Xmx4096m
```
## Requirements Checklist
- ✅ Android Studio Ladybug (2024.2.1+)
- ✅ JDK 17 or later
- ✅ Android SDK 35 (via SDK Manager)
- ✅ Build Tools 34.0.0+
- ✅ Kotlin 2.1.0+
- ✅ Gradle 8.7+
## First Build
The first build will take longer as Gradle downloads dependencies:
- Jetpack Compose libraries (~150MB)
- Material Design 3 components
- Room database libraries
- Kotlin coroutines
- WebView libraries
Subsequent builds are much faster due to caching.
## CI/CD with TeamCity
This project can integrate with your TeamCity instance:
**TeamCity URL:** https://cis1.silverlabs.uk
**Access Token:** (See ~/.claude/CLAUDE.md)
Build configuration:
```kotlin
project {
buildType {
name = "SilverDROID"
vcs {
root(GitLabVcs)
}
steps {
gradle {
tasks = "clean assembleRelease"
gradleWrapperPath = ""
}
}
}
}
```
---
Need help? Check the main README.md or open an issue on GitLab.