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
a67c79a1
Commit
a67c79a1
authored
Jan 27, 2017
by
Ian Hickson
Committed by
GitHub
Jan 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
converge flutter run and flutter drive onto one behavior (#7688)
...for the port arguments
parent
19d22c97
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
22 deletions
+22
-22
common.dart
packages/flutter_tools/lib/src/base/common.dart
+0
-1
drive.dart
packages/flutter_tools/lib/src/commands/drive.dart
+0
-3
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+0
-18
flutter_command.dart
packages/flutter_tools/lib/src/runner/flutter_command.dart
+22
-0
No files found.
packages/flutter_tools/lib/src/base/common.dart
View file @
a67c79a1
...
...
@@ -8,7 +8,6 @@ import 'platform.dart';
const
int
kDefaultObservatoryPort
=
8100
;
const
int
kDefaultDiagnosticPort
=
8101
;
const
int
kDefaultDrivePort
=
8183
;
/// Return the absolute path of the user's home directory
String
get
homeDirPath
{
...
...
packages/flutter_tools/lib/src/commands/drive.dart
View file @
a67c79a1
...
...
@@ -84,9 +84,6 @@ class DriveCommand extends RunCommandBase {
// ignore: cancel_subscriptions
StreamSubscription
<
String
>
_deviceLogSubscription
;
int
get
observatoryPort
=>
int
.
parse
(
argResults
[
'observatory-port'
]);
int
get
diagnosticPort
=>
int
.
parse
(
argResults
[
'diagnostic-port'
]);
@override
Future
<
Null
>
verifyThenRunCommand
()
async
{
commandValidator
();
...
...
packages/flutter_tools/lib/src/commands/run.dart
View file @
a67c79a1
...
...
@@ -189,24 +189,6 @@ class RunCommand extends RunCommandBase {
return
null
;
}
int
observatoryPort
;
if
(
argResults
[
'observatory-port'
]
!=
null
)
{
try
{
observatoryPort
=
int
.
parse
(
argResults
[
'observatory-port'
]);
}
catch
(
error
)
{
throwToolExit
(
'Invalid port for `--observatory-port`:
$error
'
);
}
}
int
diagnosticPort
;
if
(
argResults
[
'diagnostic-port'
]
!=
null
)
{
try
{
diagnosticPort
=
int
.
parse
(
argResults
[
'diagnostic-port'
]);
}
catch
(
error
)
{
throwToolExit
(
'Invalid port for `--diagnostic-port`:
$error
'
);
}
}
if
(
device
.
isLocalEmulator
&&
!
isEmulatorBuildMode
(
getBuildMode
()))
throwToolExit
(
'
${toTitleCase(getModeName(getBuildMode()))}
mode is not supported for emulators.'
);
...
...
packages/flutter_tools/lib/src/runner/flutter_command.dart
View file @
a67c79a1
...
...
@@ -76,6 +76,28 @@ abstract class FlutterCommand extends Command<Null> {
);
}
int
get
observatoryPort
{
if
(
argResults
[
'observatory-port'
]
!=
null
)
{
try
{
return
int
.
parse
(
argResults
[
'observatory-port'
]);
}
catch
(
error
)
{
throwToolExit
(
'Invalid port for `--observatory-port`:
$error
'
);
}
}
return
null
;
}
int
get
diagnosticPort
{
if
(
argResults
[
'diagnostic-port'
]
!=
null
)
{
try
{
return
int
.
parse
(
argResults
[
'diagnostic-port'
]);
}
catch
(
error
)
{
throwToolExit
(
'Invalid port for `--diagnostic-port`:
$error
'
);
}
}
return
null
;
}
void
addBuildModeFlags
({
bool
defaultToRelease:
true
})
{
defaultBuildMode
=
defaultToRelease
?
BuildMode
.
release
:
BuildMode
.
debug
;
...
...
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