feat: multi-flavor APK build from dashboards.yaml
build / build (push) Failing after 3m29s

Dashboard URL and label configured in dashboards.yaml; each entry
becomes a product flavor with BuildConfig.DASHBOARD_URL injected
at build time. APKs output as <flavor>-release.apk.
This commit is contained in:
Arnie via Claude
2026-06-12 18:15:21 +02:00
parent 5af5b4513d
commit 4982af9df4
7 changed files with 89 additions and 24 deletions
+11 -7
View File
@@ -1,6 +1,7 @@
# android-webview-kiosk
Android TV app: fullscreen WebView showing one hardcoded Grafana dashboard.
Android TV app: fullscreen WebView showing a configurable Grafana dashboard.
Multiple APK flavors built from `dashboards.yaml` (repo root) — one APK per entry.
Runs on the living-room Sony Bravia KD-65XE9305 (Android 8.0, API 26;
Android System WebView updates independently via Play Store — currently v138).
Launched remotely through the Bravia REST IP-control API by Control4
@@ -27,19 +28,22 @@ replaces it before any gradle command runs.
## Commands (user-run, from repo root)
- Tests: `nix develop --command gradle --no-daemon :app:testReleaseUnitTest`
- Release APK: `nix develop --command gradle --no-daemon :app:assembleRelease`
`app/build/outputs/apk/release/app-release.apk`
- Tests: `nix develop --command gradle --no-daemon :app:testWeatherReleaseUnitTest`
- All APKs: `nix develop --command gradle --no-daemon :app:assembleRelease`
`app/build/outputs/apk/<flavor>/release/<flavor>-release.apk`
- Single APK: `nix develop --command gradle --no-daemon :app:assembleWeatherRelease`
- Sideload: `adb connect <tv-ip>:5555 && adb install -r <apk>`
(bump `versionCode` in app/build.gradle.kts first for upgrades)
- Fresh install: `adb uninstall cz.c3c.webviewkiosk && adb install <apk>`
## Key facts
- Package/applicationId: `cz.c3c.webviewkiosk`; repo name keeps the
`android-` prefix, the package can't (hyphens illegal).
- Dashboard URL hardcoded in `MainActivity.DASHBOARD_URL` — changing it
means rebuild + sideload. Intentional: keeps Control4 integration to a
single parameterless launch call.
- Dashboard URL + label configured in `dashboards.yaml` (repo root). Each
entry becomes a product flavor; `BuildConfig.DASHBOARD_URL` is injected
at build time. Changing a URL means editing the YAML, rebuilding, resideloading.
Intentional: keeps Control4 integration to a single parameterless launch call.
- `signing/release.keystore` is committed on purpose (private repo,
LAN-only kiosk) so every build is upgrade-compatible. Don't reuse the key.
- minSdk 26 is a hard floor — the TV never gets newer Android.