feat(run): update Flutter Run Android task to auto-detect device
This commit is contained in:
parent
14221f4819
commit
8975a6976e
1 changed files with 4 additions and 6 deletions
10
.vscode/tasks.json
vendored
10
.vscode/tasks.json
vendored
|
|
@ -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": []
|
||||
|
|
|
|||
Loading…
Reference in a new issue