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
9a67954b
Commit
9a67954b
authored
Oct 21, 2015
by
Chinmay Garde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid script snapshot creation if the --precompiled flag is set during builds
parent
b53e7264
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
build.dart
packages/flutter_tools/lib/src/commands/build.dart
+13
-7
No files found.
packages/flutter_tools/lib/src/commands/build.dart
View file @
9a67954b
...
...
@@ -127,8 +127,8 @@ class BuildCommand extends FlutterCommand {
final
String
description
=
'Create a Flutter app.'
;
BuildCommand
()
{
argParser
.
addFlag
(
'precompiled'
,
negatable:
false
);
argParser
.
addOption
(
'asset-base'
,
defaultsTo:
_kDefaultAssetBase
);
argParser
.
addOption
(
'compiler'
);
argParser
.
addOption
(
'main'
,
defaultsTo:
_kDefaultMainPath
);
argParser
.
addOption
(
'manifest'
);
...
...
@@ -153,7 +153,8 @@ class BuildCommand extends FlutterCommand {
manifestPath:
argResults
[
'manifest'
],
outputPath:
argResults
[
'output-file'
],
snapshotPath:
argResults
[
'snapshot'
],
privateKeyPath:
argResults
[
'private-key'
]
privateKeyPath:
argResults
[
'private-key'
],
precompiledSnapshot:
argResults
[
'precompiled'
]
);
}
...
...
@@ -163,7 +164,8 @@ class BuildCommand extends FlutterCommand {
String
manifestPath
,
String
outputPath:
_kDefaultOutputPath
,
String
snapshotPath:
_kDefaultSnapshotPath
,
String
privateKeyPath:
_kDefaultPrivateKeyPath
String
privateKeyPath:
_kDefaultPrivateKeyPath
,
bool
precompiledSnapshot:
false
})
async
{
Map
manifestDescriptor
=
_loadManifest
(
manifestPath
);
...
...
@@ -172,11 +174,15 @@ class BuildCommand extends FlutterCommand {
Archive
archive
=
new
Archive
();
int
result
=
await
toolchain
.
compiler
.
compile
(
mainPath:
mainPath
,
snapshotPath:
snapshotPath
);
if
(
result
!=
0
)
return
result
;
if
(!
precompiledSnapshot
)
{
// In a precompiled snapshot, the instruction buffer contains script
// content equivalents
int
result
=
await
toolchain
.
compiler
.
compile
(
mainPath:
mainPath
,
snapshotPath:
snapshotPath
);
if
(
result
!=
0
)
return
result
;
archive
.
addFile
(
_createSnapshotFile
(
snapshotPath
));
archive
.
addFile
(
_createSnapshotFile
(
snapshotPath
));
}
for
(
_Asset
asset
in
assets
)
archive
.
addFile
(
_createFile
(
asset
.
key
,
asset
.
base
));
...
...
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