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
435ad476
Commit
435ad476
authored
Aug 05, 2016
by
Todd Volkert
Committed by
GitHub
Aug 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add --all-platforms option to `flutter precache` (#5254)
parent
eebe09d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
cache.dart
packages/flutter_tools/lib/src/cache.dart
+7
-1
precache.dart
packages/flutter_tools/lib/src/commands/precache.dart
+8
-0
No files found.
packages/flutter_tools/lib/src/cache.dart
View file @
435ad476
...
...
@@ -25,6 +25,10 @@ class Cache {
// Initialized by FlutterCommandRunner on startup.
static
String
flutterRoot
;
// Whether to cache artifacts for all platforms. Defaults to only caching
// artifacts for the current platform.
bool
includeAllPlatforms
=
false
;
static
RandomAccessFile
_lock
;
static
bool
_lockEnabled
=
true
;
...
...
@@ -238,7 +242,9 @@ class FlutterEngine {
'android-x86'
,
];
if
(
Platform
.
isMacOS
)
if
(
cache
.
includeAllPlatforms
)
dirs
.
addAll
(<
String
>[
'ios'
,
'ios-profile'
,
'ios-release'
,
'linux-x64'
]);
else
if
(
Platform
.
isMacOS
)
dirs
.
addAll
(<
String
>[
'ios'
,
'ios-profile'
,
'ios-release'
]);
else
if
(
Platform
.
isLinux
)
dirs
.
add
(
'linux-x64'
);
...
...
packages/flutter_tools/lib/src/commands/precache.dart
View file @
435ad476
...
...
@@ -8,6 +8,11 @@ import '../globals.dart';
import
'../runner/flutter_command.dart'
;
class
PrecacheCommand
extends
FlutterCommand
{
PrecacheCommand
()
{
argParser
.
addFlag
(
'all-platforms'
,
abbr:
'a'
,
negatable:
false
,
help:
'Precache artifacts for all platforms.'
);
}
@override
final
String
name
=
'precache'
;
...
...
@@ -19,6 +24,9 @@ class PrecacheCommand extends FlutterCommand {
@override
Future
<
int
>
runInProject
()
async
{
if
(
argResults
[
'all-platforms'
])
cache
.
includeAllPlatforms
=
true
;
if
(
cache
.
isUpToDate
())
printStatus
(
'Already up-to-date.'
);
else
...
...
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