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
87334eb4
Commit
87334eb4
authored
Mar 19, 2017
by
Zachary Anderson
Committed by
GitHub
Mar 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fuchsia_reload] Add flag to override on-device binary name (#8873)
parent
c95e7341
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
fuchsia_reload.dart
packages/flutter_tools/lib/src/commands/fuchsia_reload.dart
+15
-4
No files found.
packages/flutter_tools/lib/src/commands/fuchsia_reload.dart
View file @
87334eb4
...
...
@@ -28,6 +28,7 @@ class FuchsiaReloadCommand extends FlutterCommand {
String
_fuchsiaRoot
;
String
_projectRoot
;
String
_projectName
;
String
_binaryName
;
String
_fuchsiaProjectPath
;
String
_target
;
String
_address
;
...
...
@@ -55,6 +56,9 @@ class FuchsiaReloadCommand extends FlutterCommand {
argParser
.
addOption
(
'gn-target'
,
abbr:
'g'
,
help:
'GN target of the application, e.g //path/to/app:app'
);
argParser
.
addOption
(
'name-override'
,
abbr:
'n'
,
help:
'On-device name of the application binary'
);
argParser
.
addOption
(
'target'
,
abbr:
't'
,
defaultsTo:
flx
.
defaultMainPath
,
...
...
@@ -79,13 +83,13 @@ class FuchsiaReloadCommand extends FlutterCommand {
// Check that there are running VM services on the returned
// ports, and find the Isolates that are running the target app.
final
String
isolateName
=
"
$_
project
Name
\
$main
"
;
final
String
isolateName
=
"
$_
binary
Name
\
$main
"
;
final
List
<
int
>
targetPorts
=
await
_filterPorts
(
servicePorts
,
isolateName
);
if
(
targetPorts
.
length
==
0
)
{
throwToolExit
(
"No VMs found running
$_
project
Name
"
);
throwToolExit
(
"No VMs found running
$_
binary
Name
"
);
}
for
(
int
port
in
targetPorts
)
{
printTrace
(
"Found
$_
project
Name
at
$port
"
);
printTrace
(
"Found
$_
binary
Name
at
$port
"
);
}
// Set up a device and hot runner and attach the hot runner to the first
...
...
@@ -100,7 +104,7 @@ class FuchsiaReloadCommand extends FlutterCommand {
projectRootPath:
_fuchsiaProjectPath
,
packagesFilePath:
_dotPackagesPath
);
final
Uri
observatoryUri
=
Uri
.
parse
(
"http://
$fullAddress
"
);
printStatus
(
"Connecting to
$_
project
Name
at
$observatoryUri
"
);
printStatus
(
"Connecting to
$_
binary
Name
at
$observatoryUri
"
);
await
hotRunner
.
attach
(
observatoryUri
,
isolateFilter:
isolateName
);
}
...
...
@@ -171,6 +175,13 @@ class FuchsiaReloadCommand extends FlutterCommand {
if
(!
_fileExists
(
_dotPackagesPath
))
{
throwToolExit
(
"Couldn't find .packages file at
$_dotPackagesPath
"
);
}
final
String
nameOverride
=
argResults
[
'name-override'
];
if
(
nameOverride
==
null
)
{
_binaryName
=
_projectName
;
}
else
{
_binaryName
=
nameOverride
;
}
}
List
<
String
>
_extractPathAndName
(
String
gnTarget
)
{
...
...
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