Summary
Add Android build and deployment support to labelle-cli, reusing shared infrastructure from iOS implementation.
Proposed Commands
labelle android build # Build for Android device
labelle android build --emulator # Build for Android emulator
labelle android run --emulator # Build and run on emulator
labelle android studio # Generate Android Studio project
Implementation Plan
Phase 1: Shared Mobile Infrastructure
Extract common code from iOS implementation into shared modules:
Phase 2: Android-Specific Implementation
Phase 3: Emulator/Device Deployment
Shared vs Platform-Specific
| Component |
iOS |
Android |
Shared |
| Sokol callbacks |
✓ |
✓ |
Yes |
| Touch handling |
✓ |
✓ |
Yes |
| Scene loading |
✓ |
✓ |
Yes |
| Physics script |
✓ |
✓ |
Yes |
| Build.zig template |
✓ |
✓ |
Partial |
| SDK paths |
iOS SDK |
NDK |
No |
| Deployment |
simctl |
adb |
No |
| Project gen |
Xcode |
Android Studio |
No |
Dependencies
- Android NDK (for cross-compilation)
- ADB (for deployment)
- Android Studio (optional, for signing/release)
Related
- iOS support: Implemented in v0.3.7
- Sokol supports Android via OpenGL ES backend
Acceptance Criteria
Summary
Add Android build and deployment support to labelle-cli, reusing shared infrastructure from iOS implementation.
Proposed Commands
Implementation Plan
Phase 1: Shared Mobile Infrastructure
Extract common code from iOS implementation into shared modules:
Shared mobile template (
templates/mobile_main.zig)Shared build helpers (
mobile/build_helpers.zig)Shared deployment utilities (
mobile/deploy.zig)Phase 2: Android-Specific Implementation
Android commands (
android/android_commands.zig)handleAndroidBuild()- Build APK/AABhandleAndroidRun()- Deploy to emulator/devicehandleAndroidStudio()- Generate Android Studio projectAndroid build.zig template
aarch64-linux-android,x86_64-linux-androidAndroid manifest template (
AndroidManifest.xml)Android Studio project generator
build.gradletemplatesPhase 3: Emulator/Device Deployment
ADB integration
adb install)adb shell am start)emulator -avd)Hot reload support (stretch goal)
Shared vs Platform-Specific
Dependencies
Related
Acceptance Criteria
labelle android buildproduces working APKlabelle android run --emulatordeploys and launches on emulator