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
2c183f23
Unverified
Commit
2c183f23
authored
Apr 13, 2018
by
Konstantin Scheglov
Committed by
GitHub
Apr 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build once in FlutterTesterDevice. (#16457)
parent
e0cd42e4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
flutter_tester.dart
packages/flutter_tools/lib/src/tester/flutter_tester.dart
+21
-2
No files found.
packages/flutter_tools/lib/src/tester/flutter_tester.dart
View file @
2c183f23
...
...
@@ -14,6 +14,7 @@ import '../base/file_system.dart';
import
'../base/io.dart'
;
import
'../base/process_manager.dart'
;
import
'../build_info.dart'
;
import
'../bundle.dart'
as
bundle
;
import
'../dart/package_map.dart'
;
import
'../device.dart'
;
import
'../globals.dart'
;
...
...
@@ -95,7 +96,9 @@ class FlutterTesterDevice extends Device {
bool
usesTerminalUi:
true
,
bool
ipv6:
false
,
})
async
{
if
(!
debuggingOptions
.
buildInfo
.
isDebug
)
{
final
BuildInfo
buildInfo
=
debuggingOptions
.
buildInfo
;
if
(!
buildInfo
.
isDebug
)
{
printError
(
'This device only supports debug mode.'
);
return
new
LaunchResult
.
failed
();
}
...
...
@@ -119,8 +122,24 @@ class FlutterTesterDevice extends Device {
.
add
(
'--observatory-port=
${debuggingOptions.hasObservatoryPort}
'
);
}
// TODO(scheglov): Provide assets location, once it is possible.
// Build assets and perform initial compilation.
final
String
assetDirPath
=
getAssetBuildDirectory
();
final
String
applicationKernelFilePath
=
bundle
.
defaultApplicationKernelPath
;
await
bundle
.
build
(
mainPath:
mainPath
,
assetDirPath:
assetDirPath
,
applicationKernelFilePath:
applicationKernelFilePath
,
precompiledSnapshot:
!
buildInfo
.
previewDart2
,
previewDart2:
buildInfo
.
previewDart2
,
trackWidgetCreation:
buildInfo
.
trackWidgetCreation
,
);
if
(
buildInfo
.
previewDart2
)
{
mainPath
=
applicationKernelFilePath
;
}
command
.
add
(
'--flutter-assets-dir=
$assetDirPath
'
);
// TODO(scheglov): Either remove the check, or make it fail earlier.
if
(
mainPath
!=
null
)
{
command
.
add
(
mainPath
);
}
...
...
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