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

This commit is contained in:
Jesús S Guerrero
2022-02-12 12:10:11 -08:00
committed by GitHub
parent 350e3ee46d
commit f523ddd2d6
2 changed files with 12 additions and 14 deletions

View File

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

View File

@@ -319,6 +319,17 @@ 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', () {
@@ -1076,19 +1087,6 @@ 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;