From 831f8bd60370c5b7e14afdcc01df4cbd182ed548 Mon Sep 17 00:00:00 2001 From: PJ Date: Tue, 9 Jun 2026 19:52:16 +0530 Subject: [PATCH] feat(folio): select Android device via ANDROID_DEVICE in justfile --- examples/folio/justfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/folio/justfile b/examples/folio/justfile index 3a394bd..9617ecb 100644 --- a/examples/folio/justfile +++ b/examples/folio/justfile @@ -3,6 +3,7 @@ set dotenv-load := true sanderling := env_var_or_default("SANDERLING", "sanderling") avd := env_var_or_default("AVD", "") +android_device := env_var_or_default("ANDROID_DEVICE", "") duration := env_var_or_default("DURATION", "1m") seed := env_var_or_default("SEED", "0") output := env_var_or_default("OUTPUT", justfile_directory() / "sanderling" / "runs") @@ -82,6 +83,8 @@ install: _ensure-device #!/usr/bin/env bash set -euo pipefail export ANDROID_HOME="$(just _android-home)" + # ANDROID_SERIAL routes the install to the chosen device when several attach. + [[ -n "{{android_device}}" ]] && export ANDROID_SERIAL="{{android_device}}" ./gradlew :app:androidApp:installDebug # Remove the folio APK from the connected device. @@ -153,6 +156,9 @@ test: install if [[ -n "{{avd}}" ]]; then avd_flag=(--avd "{{avd}}") fi + if [[ -n "{{android_device}}" ]]; then + avd_flag+=(--device "{{android_device}}") + fi "{{sanderling}}" test \ --spec "{{justfile_directory()}}/sanderling/spec.ts" \ --bundle-id app.folio \