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
dfc3318e
Unverified
Commit
dfc3318e
authored
Mar 28, 2020
by
Jonah Williams
Committed by
GitHub
Mar 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] dont create synthetic sdk when running consumer-only (#53466)
parent
5f972087
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
update_packages.dart
packages/flutter_tools/lib/src/commands/update_packages.dart
+14
-9
No files found.
packages/flutter_tools/lib/src/commands/update_packages.dart
View file @
dfc3318e
...
...
@@ -276,13 +276,16 @@ class UpdatePackagesCommand extends FlutterCommand {
final
File
fakePackage
=
_pubspecFor
(
tempDir
);
fakePackage
.
createSync
();
fakePackage
.
writeAsStringSync
(
_generateFakePubspec
(
dependencies
.
values
));
//
First, we c
reate a synthetic flutter SDK so that transitive flutter SDK
//
C
reate a synthetic flutter SDK so that transitive flutter SDK
// constraints are not affected by this upgrade.
final
Directory
temporaryFlutterSdk
=
createTemporaryFlutterSdk
(
globals
.
fs
,
globals
.
fs
.
directory
(
Cache
.
flutterRoot
),
pubspecs
,
);
Directory
temporaryFlutterSdk
;
if
(
upgrade
)
{
temporaryFlutterSdk
=
createTemporaryFlutterSdk
(
globals
.
fs
,
globals
.
fs
.
directory
(
Cache
.
flutterRoot
),
pubspecs
,
);
}
// Next we run "pub upgrade" on this generated package:
await
pub
.
get
(
...
...
@@ -291,13 +294,15 @@ class UpdatePackagesCommand extends FlutterCommand {
upgrade:
true
,
checkLastModified:
false
,
offline:
offline
,
flutterRootOverride:
temporaryFlutterSdk
.
path
,
flutterRootOverride:
upgrade
?
temporaryFlutterSdk
.
path
:
null
,
);
// Cleanup the temporary SDK
try
{
temporaryFlutterSdk
.
deleteSync
(
recursive:
true
);
temporaryFlutterSdk
?
.
deleteSync
(
recursive:
true
);
}
on
FileSystemException
{
//
So sad..
.
//
Failed to delete temporary SDK
.
}
// Then we run "pub deps --style=compact" on the result. We pipe all the
...
...
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