Remove linux-x64 unpack logic (#42962)
diff --git a/packages/flutter_tools/lib/src/commands/unpack.dart b/packages/flutter_tools/lib/src/commands/unpack.dart
index ad423e1..068db01 100644
--- a/packages/flutter_tools/lib/src/commands/unpack.dart
+++ b/packages/flutter_tools/lib/src/commands/unpack.dart
@@ -31,15 +31,6 @@
'icudtl.dat',
'cpp_client_wrapper/',
],
- TargetPlatform.linux_x64: <String>[
- 'libflutter_linux_glfw.so',
- 'flutter_export.h',
- 'flutter_messenger.h',
- 'flutter_plugin_registrar.h',
- 'flutter_glfw.h',
- 'icudtl.dat',
- 'cpp_client_wrapper_glfw/',
- ]
};
/// Copies desktop artifacts to local cache directories.
@@ -54,7 +45,7 @@
}
@override
- String get description => 'unpack desktop artifacts';
+ String get description => '(DEPRECATED) unpack desktop artifacts';
@override
String get name => 'unpack';
@@ -130,8 +121,7 @@
cacheStamp = 'windows-sdk';
break;
case TargetPlatform.linux_x64:
- cacheStamp = 'linux-sdk';
- break;
+ return true;
default:
throwToolExit('Unsupported target platform: $platform');
}
diff --git a/packages/flutter_tools/test/commands.shard/hermetic/unpack_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/unpack_test.dart
new file mode 100644
index 0000000..aa75bef
--- /dev/null
+++ b/packages/flutter_tools/test/commands.shard/hermetic/unpack_test.dart
@@ -0,0 +1,39 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import 'package:flutter_tools/src/cache.dart';
+import 'package:flutter_tools/src/commands/unpack.dart';
+
+import '../../src/common.dart';
+import '../../src/mocks.dart';
+import '../../src/testbed.dart';
+
+void main() {
+ Testbed testbed;
+
+ setUpAll(() {
+ Cache.disableLocking();
+ });
+
+ tearDownAll(() {
+ Cache.enableLocking();
+ });
+
+ setUp(() {
+ testbed = Testbed();
+ });
+
+ test('Returns success for linux unconditionally', () => testbed.run(() async {
+ final UnpackCommand unpackCommand = UnpackCommand();
+ applyMocksToCommand(unpackCommand);
+
+ await createTestCommandRunner(unpackCommand).run(
+ <String>[
+ 'unpack',
+ '--cache-dir=foo',
+ '--target-platform=linux-x64',
+ ],
+ );
+ }));
+}