Revert "[flutter_tools] remove pub dependencies from universal #97722" (#100508)

This commit is contained in:
Jesús S Guerrero
2022-03-21 19:20:10 -07:00
committed by GitHub
parent e260b5d169
commit 50f3e47b67
2 changed files with 14 additions and 12 deletions

View File

@@ -74,7 +74,7 @@ class PubDependencies extends ArtifactSet {
}) : _logger = logger,
_flutterRoot = flutterRoot,
_pub = pub,
super(DevelopmentArtifact.web);
super(DevelopmentArtifact.universal);
final String Function() _flutterRoot;
final Logger _logger;

View File

@@ -319,17 +319,6 @@ void main() {
expect(() => cache.storageBaseUrl, throwsToolExit());
});
testWithoutContext('PubDependencies should be registered as web based', () async {
final BufferLogger logger = BufferLogger.test();
final PubDependencies pubDependencies = PubDependencies(
flutterRoot: () => '',
logger: logger,
pub: () => FakePub(),
);
expect(pubDependencies.developmentArtifact, DevelopmentArtifact.web);
});
});
testWithoutContext('flattenNameSubdirs', () {
@@ -1087,6 +1076,19 @@ class FakeSimpleArtifact extends CachedArtifact {
Future<void> updateInner(ArtifactUpdater artifactUpdater, FileSystem fileSystem, OperatingSystemUtils operatingSystemUtils) async { }
}
class FakeDownloadedArtifact extends CachedArtifact {
FakeDownloadedArtifact(this.downloadedFile, Cache cache) : super(
'fake',
cache,
DevelopmentArtifact.universal,
);
final File downloadedFile;
@override
Future<void> updateInner(ArtifactUpdater artifactUpdater, FileSystem fileSystem, OperatingSystemUtils operatingSystemUtils) async { }
}
class FakeSecondaryCachedArtifact extends Fake implements CachedArtifact {
bool upToDate = false;
bool didUpdate = false;