Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
b080a476
Unverified
Commit
b080a476
authored
Dec 11, 2018
by
Jonah Williams
Committed by
GitHub
Dec 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fuchsia multiple devices and target (#24953)
parent
f8a7abb6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
fuchsia_attach.dart
packages/flutter_tools/bin/fuchsia_attach.dart
+9
-2
No files found.
packages/flutter_tools/bin/fuchsia_attach.dart
View file @
b080a476
...
...
@@ -22,6 +22,8 @@ final ArgParser parser = ArgParser()
..
addOption
(
'build-dir'
,
help:
'The fuchsia build directory'
)
..
addOption
(
'dart-sdk'
,
help:
'The prebuilt dart SDK'
)
..
addOption
(
'target'
,
help:
'The GN target to attach to'
)
..
addOption
(
'entrypoint'
,
defaultsTo:
'main.dart'
,
help:
'The filename of the main method. Defaults to main.dart'
)
..
addOption
(
'device'
,
help:
'The device id to attach to'
)
..
addFlag
(
'verbose'
,
negatable:
true
);
// Track the original working directory so that the tool can find the
...
...
@@ -50,10 +52,11 @@ Future<void> main(List<String> args) async {
fs
.
currentDirectory
=
path
;
// Check for a package with a lib directory.
String
targetFile
=
'lib/main.dart'
;
final
String
entrypoint
=
argResults
[
'entrypoint'
];
String
targetFile
=
'lib/
$entrypoint
'
;
if
(!
fs
.
file
(
targetFile
).
existsSync
())
{
// Otherwise assume the package is flat.
targetFile
=
'main.dart'
;
targetFile
=
entrypoint
;
}
final
List
<
String
>
command
=
<
String
>[
'attach'
,
...
...
@@ -70,6 +73,10 @@ Future<void> main(List<String> args) async {
'--packages'
,
packages
,
];
final
String
deviceName
=
argResults
[
'device'
];
if
(
deviceName
!=
null
&&
deviceName
.
isNotEmpty
)
{
command
.
addAll
(<
String
>[
'-d'
,
deviceName
]);
}
if
(
verbose
)
{
command
.
add
(
'--verbose'
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment