Don't pre-cache Android artifacts with --no-android flag (#49009)
This commit is contained in:
committed by
Flutter GitHub Bot
parent
975bb08a62
commit
ac7b307803
@@ -44,8 +44,6 @@ void main() {
|
||||
expect(artifacts, unorderedEquals(<DevelopmentArtifact>{
|
||||
DevelopmentArtifact.universal,
|
||||
DevelopmentArtifact.web,
|
||||
DevelopmentArtifact.androidGenSnapshot,
|
||||
DevelopmentArtifact.androidMaven,
|
||||
}));
|
||||
}, overrides: <Type, Generator>{
|
||||
Cache: () => cache,
|
||||
@@ -59,14 +57,25 @@ void main() {
|
||||
|
||||
expect(artifacts, unorderedEquals(<DevelopmentArtifact>{
|
||||
DevelopmentArtifact.universal,
|
||||
DevelopmentArtifact.androidGenSnapshot,
|
||||
DevelopmentArtifact.androidMaven,
|
||||
}));
|
||||
}, overrides: <Type, Generator>{
|
||||
Cache: () => cache,
|
||||
FeatureFlags: () => TestFeatureFlags(isWebEnabled: false),
|
||||
});
|
||||
|
||||
testUsingContext('precache exits if requesting mismatched artifacts.', () async {
|
||||
final PrecacheCommand command = PrecacheCommand();
|
||||
applyMocksToCommand(command);
|
||||
|
||||
expect(createTestCommandRunner(command).run(const <String>['precache',
|
||||
'--no-android',
|
||||
'--android_gen_snapshot',
|
||||
]), throwsToolExit(message: '--android_gen_snapshot requires --android'));
|
||||
}, overrides: <Type, Generator>{
|
||||
Cache: () => cache,
|
||||
FeatureFlags: () => TestFeatureFlags(isWebEnabled: false),
|
||||
});
|
||||
|
||||
testUsingContext('precache adds artifact flags to requested artifacts', () async {
|
||||
final PrecacheCommand command = PrecacheCommand();
|
||||
applyMocksToCommand(command);
|
||||
|
||||
Reference in New Issue
Block a user