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
fa41afa8
Unverified
Commit
fa41afa8
authored
Nov 17, 2020
by
Jonah Williams
Committed by
GitHub
Nov 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] reduce build bundle API (#70514)
parent
a228a17c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3 additions
and
33 deletions
+3
-33
bundle.dart
packages/flutter_tools/lib/src/bundle.dart
+0
-5
build_bundle.dart
packages/flutter_tools/lib/src/commands/build_bundle.dart
+3
-22
flutter_tester.dart
packages/flutter_tools/lib/src/tester/flutter_tester.dart
+0
-2
build_bundle_test.dart
...ools/test/commands.shard/permeable/build_bundle_test.dart
+0
-2
bundle_shim_test.dart
...es/flutter_tools/test/general.shard/bundle_shim_test.dart
+0
-2
No files found.
packages/flutter_tools/lib/src/bundle.dart
View file @
fa41afa8
...
...
@@ -82,8 +82,6 @@ class BundleBuilder {
String
applicationKernelFilePath
,
String
depfilePath
,
String
assetDirPath
,
bool
precompiledSnapshot
=
false
,
bool
reportLicensedPackages
=
false
,
bool
trackWidgetCreation
=
false
,
List
<
String
>
extraFrontEndOptions
=
const
<
String
>[],
List
<
String
>
extraGenSnapshotOptions
=
const
<
String
>[],
...
...
@@ -102,7 +100,6 @@ class BundleBuilder {
flutterProject:
flutterProject
,
outputDir:
assetDirPath
,
depfilePath:
depfilePath
,
precompiled:
precompiledSnapshot
,
trackWidgetCreation:
trackWidgetCreation
,
treeShakeIcons:
treeShakeIcons
,
dartDefines:
buildInfo
.
dartDefines
,
...
...
@@ -128,13 +125,11 @@ Future<void> buildWithAssemble({
@required
String
mainPath
,
@required
String
outputDir
,
@required
String
depfilePath
,
@required
bool
precompiled
,
bool
trackWidgetCreation
,
@required
bool
treeShakeIcons
,
List
<
String
>
dartDefines
,
})
async
{
// If the precompiled flag was not passed, force us into debug mode.
buildMode
=
precompiled
?
buildMode
:
BuildMode
.
debug
;
final
Environment
environment
=
Environment
(
projectDir:
flutterProject
.
directory
,
outputDir:
globals
.
fs
.
directory
(
outputDir
),
...
...
packages/flutter_tools/lib/src/commands/build_bundle.dart
View file @
fa41afa8
...
...
@@ -18,22 +18,9 @@ class BuildBundleCommand extends BuildSubCommand {
usesTargetOption
();
usesFilesystemOptions
(
hide:
!
verboseHelp
);
usesBuildNumberOption
();
addBuildModeFlags
(
verboseHelp:
verboseHelp
);
addBuildModeFlags
(
verboseHelp:
verboseHelp
,
defaultToRelease:
false
);
usesExtraDartFlagOptions
();
argParser
..
addFlag
(
'precompiled'
,
negatable:
false
,
help:
'If not provided, then '
'a debug build is always provided, regardless of build mode. If provided '
'then release is the default mode.'
,
)
// This option is still referenced by the iOS build scripts. We should
// remove it once we've updated those build scripts.
..
addOption
(
'asset-base'
,
help:
'Ignored. Will be removed.'
,
hide:
!
verboseHelp
)
..
addOption
(
'manifest'
,
defaultsTo:
defaultManifestPath
)
..
addOption
(
'private-key'
,
defaultsTo:
defaultPrivateKeyPath
)
..
addOption
(
'depfile'
,
defaultsTo:
defaultDepfilePath
)
..
addOption
(
'target-platform'
,
defaultsTo:
'android-arm'
,
...
...
@@ -48,11 +35,7 @@ class BuildBundleCommand extends BuildSubCommand {
'windows-x64'
,
],
)
..
addOption
(
'asset-dir'
,
defaultsTo:
getAssetBuildDirectory
())
..
addFlag
(
'report-licensed-packages'
,
help:
'Whether to report the names of all the packages that are included '
"in the application's LICENSE file."
,
defaultsTo:
false
);
..
addOption
(
'asset-dir'
,
defaultsTo:
getAssetBuildDirectory
());
usesPubOption
();
usesTrackWidgetCreation
(
verboseHelp:
verboseHelp
);
...
...
@@ -119,11 +102,9 @@ class BuildBundleCommand extends BuildSubCommand {
platform:
platform
,
buildInfo:
buildInfo
,
mainPath:
targetFile
,
manifestPath:
stringArg
(
'manifest'
)
,
manifestPath:
defaultManifestPath
,
depfilePath:
stringArg
(
'depfile'
),
assetDirPath:
stringArg
(
'asset-dir'
),
precompiledSnapshot:
boolArg
(
'precompiled'
),
reportLicensedPackages:
boolArg
(
'report-licensed-packages'
),
trackWidgetCreation:
boolArg
(
'track-widget-creation'
),
extraFrontEndOptions:
buildInfo
.
extraFrontEndOptions
,
extraGenSnapshotOptions:
buildInfo
.
extraGenSnapshotOptions
,
...
...
packages/flutter_tools/lib/src/tester/flutter_tester.dart
View file @
fa41afa8
...
...
@@ -158,9 +158,7 @@ class FlutterTesterDevice extends Device {
await
BundleBuilder
().
build
(
buildInfo:
buildInfo
,
mainPath:
mainPath
,
assetDirPath:
assetDirPath
,
applicationKernelFilePath:
applicationKernelFilePath
,
precompiledSnapshot:
false
,
trackWidgetCreation:
buildInfo
.
trackWidgetCreation
,
platform:
getTargetPlatformForName
(
getNameForHostPlatform
(
getCurrentHostPlatform
())),
treeShakeIcons:
buildInfo
.
treeShakeIcons
,
...
...
packages/flutter_tools/test/commands.shard/permeable/build_bundle_test.dart
View file @
fa41afa8
...
...
@@ -39,8 +39,6 @@ void main() {
applicationKernelFilePath:
anyNamed
(
'applicationKernelFilePath'
),
depfilePath:
anyNamed
(
'depfilePath'
),
assetDirPath:
anyNamed
(
'assetDirPath'
),
precompiledSnapshot:
anyNamed
(
'precompiledSnapshot'
),
reportLicensedPackages:
anyNamed
(
'reportLicensedPackages'
),
trackWidgetCreation:
anyNamed
(
'trackWidgetCreation'
),
extraFrontEndOptions:
anyNamed
(
'extraFrontEndOptions'
),
extraGenSnapshotOptions:
anyNamed
(
'extraGenSnapshotOptions'
),
...
...
packages/flutter_tools/test/general.shard/bundle_shim_test.dart
View file @
fa41afa8
...
...
@@ -38,7 +38,6 @@ void main() {
outputDir:
'example'
,
targetPlatform:
TargetPlatform
.
ios
,
depfilePath:
'example.d'
,
precompiled:
false
,
treeShakeIcons:
false
,
);
expect
(
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
'example'
,
'kernel_blob.bin'
)).
existsSync
(),
true
);
...
...
@@ -61,7 +60,6 @@ void main() {
outputDir:
'example'
,
targetPlatform:
TargetPlatform
.
linux_x64
,
depfilePath:
'example.d'
,
precompiled:
false
,
treeShakeIcons:
false
,
),
throwsToolExit
());
}));
...
...
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