Revert "[flutter_tools] remove all pub caching logic (#66776)" (#67572)

This reverts commit 76cbc462d2.
This commit is contained in:
Jonah Williams
2020-10-07 15:30:46 -07:00
committed by GitHub
parent 5e4c86d124
commit a4e0e2a8ee
12 changed files with 180 additions and 43 deletions

View File

@@ -950,9 +950,9 @@ abstract class FlutterCommand extends Command<void> {
// First always update universal artifacts, as some of these (e.g.
// ios-deploy on macOS) are required to determine `requiredArtifacts`.
await globals.cache.updateAll(<DevelopmentArtifact>{DevelopmentArtifact.universal});
await globals.cache.updateAll(await requiredArtifacts);
}
Cache.releaseLock();
await validateCommand();
@@ -979,7 +979,11 @@ abstract class FlutterCommand extends Command<void> {
context: PubContext.getVerifyContext(name),
generateSyntheticPackage: project.manifest.generateSyntheticPackage,
);
// All done updating dependencies. Release the cache lock.
Cache.releaseLock();
await project.ensureReadyForPlatformSpecificTooling(checkProjects: true);
} else {
Cache.releaseLock();
}
setupApplicationPackages();