16 lines
507 B
Bash
Executable File
16 lines
507 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Builds (optional), installs and launches the debug APK.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/../.."
|
|
ADB=${ADB:-adb}
|
|
PKG=${PKG:-com.ironarc.iron_arc}
|
|
if [ "${SKIP_BUILD:-0}" != "1" ]; then
|
|
(cd app && flutter build apk --debug --target-platform android-arm64)
|
|
fi
|
|
apk=app/build/app/outputs/flutter-apk/app-debug.apk
|
|
[ -f "$apk" ] || { echo "missing $apk" >&2; exit 1; }
|
|
$ADB install -r "$apk"
|
|
$ADB shell am force-stop "$PKG"
|
|
$ADB shell am start -n "$PKG/.MainActivity"
|
|
echo 'launched'
|