feat(run): update Flutter Run Android task to auto-detect device

This commit is contained in:
Lukas Müllner 2026-03-10 06:31:23 +01:00
parent 14221f4819
commit 8975a6976e

10
.vscode/tasks.json vendored
View file

@ -76,14 +76,12 @@
"problemMatcher": []
},
{
"label": "Flutter Run Android (Supabase Debug)",
"label": "Flutter Run Android (Supabase Debug - Auto Device)",
"type": "shell",
"command": "flutter",
"command": "bash",
"args": [
"run",
"-d",
"BM1S1B2416004987",
"--dart-define-from-file=.env/flutter_defines.json"
"-lc",
"device=$(flutter devices --machine | jq -r '.[] | select(.targetPlatform | startswith(\"android\")) | .id' | head -n 1) && [ -n \"$device\" ] && flutter run -d \"$device\" --dart-define-from-file=.env/flutter_defines.json || (echo 'No Android device found.' >&2; exit 1)"
],
"group": "build",
"problemMatcher": []