[flutter_tools] restore pub caching functionality (#70133)

Necessary to work around #70013 (this looks like it will be fixed, but should protect us in the future)

Restores some notion of skipping pub, with differences from the prior implementation:

Off by default, and only used by the flutter command automatic pub get
A single check parameter. Uses the framework version cached per-project instead of a timestamp of the tool, to avoid cases where downloading a prebuilt framework would cause this check to no longer work.
This commit is contained in:
Jonah Williams
2020-11-09 16:11:55 -08:00
committed by GitHub
parent bbc0161669
commit ff953e4f83
4 changed files with 296 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ class ThrowingPub implements Pub {
bool skipPubspecYamlCheck = false,
bool generateSyntheticPackage = false,
String flutterRootOverride,
bool checkUpToDate = false,
}) {
throw UnsupportedError('Attempted to invoke pub during test.');
}