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
4fb7c91e
Unverified
Commit
4fb7c91e
authored
May 14, 2018
by
Alexander Markov
Committed by
GitHub
May 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Plumb --extra-front-end-options in flutter build bundle (#17404)
parent
ee019c0b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
flutter.gradle
packages/flutter_tools/gradle/flutter.gradle
+3
-0
bundle.dart
packages/flutter_tools/lib/src/bundle.dart
+4
-0
build_bundle.dart
packages/flutter_tools/lib/src/commands/build_bundle.dart
+6
-0
No files found.
packages/flutter_tools/gradle/flutter.gradle
View file @
4fb7c91e
...
...
@@ -458,6 +458,9 @@ abstract class BaseFlutterTask extends DefaultTask {
if
(
trackWidgetCreation
)
{
args
"--track-widget-creation"
}
if
(
extraFrontEndOptions
!=
null
)
{
args
"--extra-front-end-options"
,
"${extraFrontEndOptions}"
}
if
(
buildMode
!=
"debug"
)
{
args
"--precompiled"
}
else
{
...
...
packages/flutter_tools/lib/src/bundle.dart
View file @
4fb7c91e
...
...
@@ -41,6 +41,7 @@ Future<void> build({
bool
precompiledSnapshot:
false
,
bool
reportLicensedPackages:
false
,
bool
trackWidgetCreation:
false
,
List
<
String
>
extraFrontEndOptions:
const
<
String
>[],
List
<
String
>
fileSystemRoots
,
String
fileSystemScheme
,
})
async
{
...
...
@@ -70,6 +71,8 @@ Future<void> build({
DevFSContent
kernelContent
;
if
(!
precompiledSnapshot
&&
previewDart2
)
{
if
((
extraFrontEndOptions
!=
null
)
&&
extraFrontEndOptions
.
isNotEmpty
)
printTrace
(
'Extra front-end options:
$extraFrontEndOptions
'
);
ensureDirectoryExists
(
applicationKernelFilePath
);
final
CompilerOutput
compilerOutput
=
await
kernelCompiler
.
compile
(
sdkRoot:
artifacts
.
getArtifactPath
(
Artifact
.
flutterPatchedSdkPath
),
...
...
@@ -78,6 +81,7 @@ Future<void> build({
outputFilePath:
applicationKernelFilePath
,
depFilePath:
depfilePath
,
trackWidgetCreation:
trackWidgetCreation
,
extraFrontEndOptions:
extraFrontEndOptions
,
fileSystemRoots:
fileSystemRoots
,
fileSystemScheme:
fileSystemScheme
,
packagesPath:
packagesPath
,
...
...
packages/flutter_tools/lib/src/commands/build_bundle.dart
View file @
4fb7c91e
...
...
@@ -6,6 +6,7 @@ import 'dart:async';
import
'../build_info.dart'
;
import
'../bundle.dart'
;
import
'../runner/flutter_command.dart'
show
FlutterOptions
;
import
'build.dart'
;
class
BuildBundleCommand
extends
BuildSubCommand
{
...
...
@@ -30,6 +31,10 @@ class BuildBundleCommand extends BuildSubCommand {
hide:
!
verboseHelp
,
help:
'Track widget creation locations. Requires Dart 2.0 functionality.'
,
)
..
addMultiOption
(
FlutterOptions
.
kExtraFrontEndOptions
,
splitCommas:
true
,
hide:
true
,
)
..
addOption
(
'asset-dir'
,
defaultsTo:
getAssetBuildDirectory
())
..
addFlag
(
'report-licensed-packages'
,
help:
'Whether to report the names of all the packages that are included '
...
...
@@ -76,6 +81,7 @@ class BuildBundleCommand extends BuildSubCommand {
precompiledSnapshot:
argResults
[
'precompiled'
],
reportLicensedPackages:
argResults
[
'report-licensed-packages'
],
trackWidgetCreation:
argResults
[
'track-widget-creation'
],
extraFrontEndOptions:
argResults
[
FlutterOptions
.
kExtraFrontEndOptions
],
fileSystemScheme:
argResults
[
'filesystem-scheme'
],
fileSystemRoots:
argResults
[
'filesystem-root'
],
);
...
...
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