Connects adb, installs all flavor APKs, disconnects on exit (trap). tv-connect and tv-install kept for manual use. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,9 +33,10 @@ post-25.11). No file rewriting; `gradle.properties` stays untouched.
|
|||||||
- All APKs: `gradle --no-daemon :app:assembleRelease`
|
- All APKs: `gradle --no-daemon :app:assembleRelease`
|
||||||
→ `app/build/outputs/apk/<flavor>/release/<flavor>-release.apk`
|
→ `app/build/outputs/apk/<flavor>/release/<flavor>-release.apk`
|
||||||
- Single APK: `gradle --no-daemon :app:assembleWeatherRelease`
|
- Single APK: `gradle --no-daemon :app:assembleWeatherRelease`
|
||||||
- Connect ADB: `tv-connect` (uses $TV_IP from .envrc)
|
- Deploy all: `tv-deploy` — connects, installs all flavor APKs, disconnects
|
||||||
- Sideload: `tv-install <flavor>` e.g. `tv-install weather`
|
|
||||||
(bump `versionCode` in app/build.gradle.kts first for upgrades)
|
(bump `versionCode` in app/build.gradle.kts first for upgrades)
|
||||||
|
- Connect ADB: `tv-connect` (uses $TV_IP from .envrc)
|
||||||
|
- Single flavor: `tv-install <flavor>` e.g. `tv-install weather`
|
||||||
- Fresh install: `adb uninstall cz.c3c.webviewkiosk.<flavor> && tv-install <flavor>`
|
- Fresh install: `adb uninstall cz.c3c.webviewkiosk.<flavor> && tv-install <flavor>`
|
||||||
|
|
||||||
## Key facts
|
## Key facts
|
||||||
|
|||||||
@@ -67,6 +67,13 @@
|
|||||||
shellHook = ''
|
shellHook = ''
|
||||||
tv-connect() { adb connect "$TV_IP:5555"; }
|
tv-connect() { adb connect "$TV_IP:5555"; }
|
||||||
tv-install() { adb install -r "app/build/outputs/apk/$1/release/$1-release.apk"; }
|
tv-install() { adb install -r "app/build/outputs/apk/$1/release/$1-release.apk"; }
|
||||||
|
tv-deploy() (
|
||||||
|
trap 'adb disconnect "$TV_IP:5555"' EXIT
|
||||||
|
adb connect "$TV_IP:5555" || return 1
|
||||||
|
for apk in app/build/outputs/apk/*/release/*.apk; do
|
||||||
|
adb install -r "$apk" || return 1
|
||||||
|
done
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user