Skip to content

Commit 32abf42

Browse files
authored
[flutter_tool] Download gen_snapshot.zip for macOS desktop (#97627)
1 parent 822a4d6 commit 32abf42

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

‎packages/flutter_tools/lib/src/flutter_cache.dart‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,10 +870,13 @@ const List<List<String>> _windowsUwpDesktopBinaryDirs = <List<String>>[
870870

871871
const List<List<String>> _macOSDesktopBinaryDirs = <List<String>>[
872872
<String>['darwin-x64', 'darwin-x64/FlutterMacOS.framework.zip'],
873+
<String>['darwin-x64', 'darwin-x64/gen_snapshot.zip'],
873874
<String>['darwin-x64-profile', 'darwin-x64-profile/FlutterMacOS.framework.zip'],
874875
<String>['darwin-x64-profile', 'darwin-x64-profile/artifacts.zip'],
876+
<String>['darwin-x64-profile', 'darwin-x64-profile/gen_snapshot.zip'],
875877
<String>['darwin-x64-release', 'darwin-x64-release/FlutterMacOS.framework.zip'],
876878
<String>['darwin-x64-release', 'darwin-x64-release/artifacts.zip'],
879+
<String>['darwin-x64-release', 'darwin-x64-release/gen_snapshot.zip'],
877880
];
878881

879882
const List<List<String>> _osxBinaryDirs = <List<String>>[

‎packages/flutter_tools/test/general.shard/cache_test.dart‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,19 @@ void main() {
557557
]);
558558
});
559559

560+
testWithoutContext('macOS desktop artifacts include all gen_snapshot binaries', () {
561+
final Cache cache = Cache.test(processManager: FakeProcessManager.any());
562+
final MacOSEngineArtifacts artifacts = MacOSEngineArtifacts(cache, platform: FakePlatform());
563+
cache.includeAllPlatforms = false;
564+
cache.platformOverrideArtifacts = <String>{'macos'};
565+
566+
expect(artifacts.getBinaryDirs(), containsAll(<List<String>>[
567+
<String>['darwin-x64', 'darwin-x64/gen_snapshot.zip'],
568+
<String>['darwin-x64-profile', 'darwin-x64-profile/gen_snapshot.zip'],
569+
<String>['darwin-x64-release', 'darwin-x64-release/gen_snapshot.zip'],
570+
]));
571+
});
572+
560573
testWithoutContext('macOS desktop artifacts ignore filtering when requested', () {
561574
final Cache cache = Cache.test(processManager: FakeProcessManager.any());
562575
final MacOSEngineArtifacts artifacts = MacOSEngineArtifacts(cache, platform: FakePlatform());

0 commit comments

Comments
 (0)