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
5faf84c3
Commit
5faf84c3
authored
Mar 09, 2016
by
Alhaad Gokhale
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2528 from alhaad/depsfile_hook
Add `flutter_tools build` hooks to also generate depfile.
parents
ad7fd3e4
b8d64ffe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
build.dart
packages/flutter_tools/lib/src/commands/build.dart
+2
-0
flx.dart
packages/flutter_tools/lib/src/flx.dart
+3
-1
toolchain.dart
packages/flutter_tools/lib/src/toolchain.dart
+12
-3
No files found.
packages/flutter_tools/lib/src/commands/build.dart
View file @
5faf84c3
...
...
@@ -23,6 +23,7 @@ class BuildCommand extends FlutterCommand {
argParser
.
addOption
(
'private-key'
,
defaultsTo:
defaultPrivateKeyPath
);
argParser
.
addOption
(
'output-file'
,
abbr:
'o'
,
defaultsTo:
defaultFlxOutputPath
);
argParser
.
addOption
(
'snapshot'
,
defaultsTo:
defaultSnapshotPath
);
argParser
.
addOption
(
'depfile'
,
defaultsTo:
defaultDepfilePath
);
addTargetOption
();
}
...
...
@@ -42,6 +43,7 @@ class BuildCommand extends FlutterCommand {
manifestPath:
argResults
[
'manifest'
],
outputPath:
outputPath
,
snapshotPath:
argResults
[
'snapshot'
],
depfilePath:
argResults
[
'depfile'
],
privateKeyPath:
argResults
[
'private-key'
],
precompiledSnapshot:
argResults
[
'precompiled'
]
).
then
((
int
result
)
{
...
...
packages/flutter_tools/lib/src/flx.dart
View file @
5faf84c3
...
...
@@ -22,6 +22,7 @@ const String defaultAssetBasePath = '.';
const
String
defaultManifestPath
=
'flutter.yaml'
;
const
String
defaultFlxOutputPath
=
'build/app.flx'
;
const
String
defaultSnapshotPath
=
'build/snapshot_blob.bin'
;
const
String
defaultDepfilePath
=
'build/snapshot_blob.bin.d'
;
const
String
defaultPrivateKeyPath
=
'privatekey.der'
;
const
String
_kSnapshotKey
=
'snapshot_blob.bin'
;
...
...
@@ -160,6 +161,7 @@ Future<int> build(
String
manifestPath:
defaultManifestPath
,
String
outputPath:
defaultFlxOutputPath
,
String
snapshotPath:
defaultSnapshotPath
,
String
depfilePath:
defaultDepfilePath
,
String
privateKeyPath:
defaultPrivateKeyPath
,
bool
precompiledSnapshot:
false
})
async
{
...
...
@@ -173,7 +175,7 @@ Future<int> build(
// In a precompiled snapshot, the instruction buffer contains script
// content equivalents
int
result
=
await
toolchain
.
compiler
.
compile
(
mainPath:
mainPath
,
snapshotPath:
snapshotPath
);
int
result
=
await
toolchain
.
compiler
.
compile
(
mainPath:
mainPath
,
snapshotPath:
snapshotPath
,
depfilePath:
depfilePath
,
buildOutputPath:
outputPath
);
if
(
result
!=
0
)
{
printError
(
'Failed to run the Flutter compiler. Exit code:
$result
'
);
return
result
;
...
...
packages/flutter_tools/lib/src/toolchain.dart
View file @
5faf84c3
...
...
@@ -18,14 +18,23 @@ class Compiler {
Future
<
int
>
compile
({
String
mainPath
,
String
snapshotPath
String
snapshotPath
,
String
depfilePath
,
String
buildOutputPath
})
{
return
runCommandAndStreamOutput
(
[
final
List
<
String
>
args
=
[
_path
,
mainPath
,
'--package-root=
${ArtifactStore.packageRoot}
'
,
'--snapshot=
$snapshotPath
'
]);
];
if
(
depfilePath
!=
null
)
{
args
.
add
(
'--depfile=
$depfilePath
'
);
}
if
(
buildOutputPath
!=
null
)
{
args
.
add
(
'--build-output=
$buildOutputPath
'
);
}
return
runCommandAndStreamOutput
(
args
);
}
}
...
...
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