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
d3cc5548
Commit
d3cc5548
authored
Jul 25, 2016
by
Devon Carew
Committed by
GitHub
Jul 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flutter run target 2 (#5035)
* This reverts commit
5e7e7b6e
. * default to lib/main.dart
parent
07ba3797
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
22 additions
and
14 deletions
+22
-14
build_aot.dart
packages/flutter_tools/lib/src/commands/build_aot.dart
+1
-1
build_apk.dart
packages/flutter_tools/lib/src/commands/build_apk.dart
+2
-2
build_flx.dart
packages/flutter_tools/lib/src/commands/build_flx.dart
+1
-1
build_ios.dart
packages/flutter_tools/lib/src/commands/build_ios.dart
+1
-1
drive.dart
packages/flutter_tools/lib/src/commands/drive.dart
+3
-3
listen.dart
packages/flutter_tools/lib/src/commands/listen.dart
+1
-1
refresh.dart
packages/flutter_tools/lib/src/commands/refresh.dart
+1
-1
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+2
-3
flutter_command.dart
packages/flutter_tools/lib/src/runner/flutter_command.dart
+10
-1
No files found.
packages/flutter_tools/lib/src/commands/build_aot.dart
View file @
d3cc5548
...
...
@@ -56,7 +56,7 @@ class BuildAotCommand extends BuildSubCommand {
String
typeName
=
path
.
basename
(
tools
.
getEngineArtifactsDirectory
(
platform
,
getBuildMode
()).
path
);
Status
status
=
logger
.
startProgress
(
'Building AOT snapshot in
${getModeName(getBuildMode())}
mode (
$typeName
)...'
);
String
outputPath
=
await
buildAotSnapshot
(
findMainDartFile
(
argResults
[
'target'
]
),
findMainDartFile
(
targetFile
),
platform
,
getBuildMode
(),
outputPath:
argResults
[
'output-dir'
],
...
...
packages/flutter_tools/lib/src/commands/build_apk.dart
View file @
d3cc5548
...
...
@@ -208,7 +208,7 @@ class BuildApkCommand extends BuildSubCommand {
return
await
buildAndroidWithGradle
(
TargetPlatform
.
android_arm
,
getBuildMode
(),
target:
argResults
[
'target'
]
target:
targetFile
);
}
else
{
// TODO(devoncarew): This command should take an arg for the output type (arm / x64).
...
...
@@ -219,7 +219,7 @@ class BuildApkCommand extends BuildSubCommand {
manifest:
argResults
[
'manifest'
],
resources:
argResults
[
'resources'
],
outputFile:
argResults
[
'output-file'
],
target:
argResults
[
'target'
]
,
target:
targetFile
,
flxPath:
argResults
[
'flx'
],
aotPath:
argResults
[
'aot-path'
],
keystore:
(
argResults
[
'keystore'
]
??
''
).
isEmpty
?
null
:
new
ApkKeystoreInfo
(
...
...
packages/flutter_tools/lib/src/commands/build_flx.dart
View file @
d3cc5548
...
...
@@ -41,7 +41,7 @@ class BuildFlxCommand extends BuildSubCommand {
String
outputPath
=
argResults
[
'output-file'
];
return
await
build
(
mainPath:
argResults
[
'target'
]
,
mainPath:
targetFile
,
manifestPath:
argResults
[
'manifest'
],
outputPath:
outputPath
,
snapshotPath:
argResults
[
'snapshot'
],
...
...
packages/flutter_tools/lib/src/commands/build_ios.dart
View file @
d3cc5548
...
...
@@ -58,7 +58,7 @@ class BuildIOSCommand extends BuildSubCommand {
XcodeBuildResult
result
=
await
buildXcodeProject
(
app:
app
,
mode:
getBuildMode
(),
target:
argResults
[
'target'
]
,
target:
targetFile
,
buildForDevice:
!
forSimulator
,
codesign:
shouldCodesign
);
...
...
packages/flutter_tools/lib/src/commands/drive.dart
View file @
d3cc5548
...
...
@@ -160,7 +160,7 @@ class DriveCommand extends RunCommandBase {
}
String
_getTestFile
()
{
String
appFile
=
path
.
normalize
(
target
);
String
appFile
=
path
.
normalize
(
target
File
);
// This command extends `flutter start` and therefore CWD == package dir
String
packageDir
=
getCurrentDirectory
();
...
...
@@ -266,7 +266,7 @@ void restoreAppStarter() {
}
Future
<
int
>
startApp
(
DriveCommand
command
)
async
{
String
mainPath
=
findMainDartFile
(
command
.
target
);
String
mainPath
=
findMainDartFile
(
command
.
target
File
);
if
(
await
fs
.
type
(
mainPath
)
!=
FileSystemEntityType
.
FILE
)
{
printError
(
'Tried to run
$mainPath
, but that file does not exist.'
);
return
1
;
...
...
@@ -277,7 +277,7 @@ Future<int> startApp(DriveCommand command) async {
printTrace
(
'Building an APK.'
);
int
result
=
await
build_apk
.
buildApk
(
command
.
device
.
platform
,
target:
command
.
target
,
target:
command
.
target
File
,
buildMode:
command
.
getBuildMode
()
);
...
...
packages/flutter_tools/lib/src/commands/listen.dart
View file @
d3cc5548
...
...
@@ -62,7 +62,7 @@ class ListenCommand extends RunCommandBase {
result = await startApp(
deviceForCommand,
target: target,
target: target
File
,
install: firstTime,
stop: true,
debuggingOptions: new DebuggingOptions.enabled(getBuildMode()),
...
...
packages/flutter_tools/lib/src/commands/refresh.dart
View file @
d3cc5548
...
...
@@ -40,7 +40,7 @@ class RefreshCommand extends FlutterCommand {
Directory
tempDir
=
await
Directory
.
systemTemp
.
createTemp
(
'flutter_tools'
);
try
{
String
snapshotPath
=
path
.
join
(
tempDir
.
path
,
'snapshot_blob.bin'
);
int
result
=
await
createSnapshot
(
mainPath:
argResults
[
'target'
]
,
snapshotPath:
snapshotPath
);
int
result
=
await
createSnapshot
(
mainPath:
targetFile
,
snapshotPath:
snapshotPath
);
if
(
result
!=
0
)
{
printError
(
'Failed to run the Flutter compiler. Exit code:
$result
'
);
...
...
packages/flutter_tools/lib/src/commands/run.dart
View file @
d3cc5548
...
...
@@ -33,7 +33,6 @@ abstract class RunCommandBase extends FlutterCommand {
}
bool
get
traceStartup
=>
argResults
[
'trace-startup'
];
String
get
target
=>
argResults
[
'target'
];
String
get
route
=>
argResults
[
'route'
];
}
...
...
@@ -135,7 +134,7 @@ class RunCommand extends RunCommandBase {
if
(
argResults
[
'resident'
])
{
RunAndStayResident
runner
=
new
RunAndStayResident
(
deviceForCommand
,
target:
target
,
target:
target
File
,
debuggingOptions:
options
,
hotMode:
argResults
[
'hot'
]
);
...
...
@@ -150,7 +149,7 @@ class RunCommand extends RunCommandBase {
// using the `RunAndStayResident` class.
return
startApp
(
deviceForCommand
,
target:
target
,
target:
target
File
,
stop:
argResults
[
'full-restart'
],
install:
true
,
debuggingOptions:
options
,
...
...
packages/flutter_tools/lib/src/runner/flutter_command.dart
View file @
d3cc5548
...
...
@@ -53,6 +53,15 @@ abstract class FlutterCommand extends Command {
_usesTargetOption
=
true
;
}
String
get
targetFile
{
if
(
argResults
.
wasParsed
(
'target'
))
return
argResults
[
'target'
];
else
if
(
argResults
.
rest
.
isNotEmpty
)
return
argResults
.
rest
.
first
;
else
return
flx
.
defaultMainPath
;
}
void
usesPubOption
()
{
argParser
.
addFlag
(
'pub'
,
defaultsTo:
true
,
...
...
@@ -184,7 +193,7 @@ abstract class FlutterCommand extends Command {
}
if
(
_usesTargetOption
)
{
String
targetPath
=
argResults
[
'target'
]
;
String
targetPath
=
targetFile
;
if
(!
FileSystemEntity
.
isFileSync
(
targetPath
))
{
printError
(
'Target file "
$targetPath
" not found.'
);
return
false
;
...
...
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