mirror of
https://github.com/flutter/flutter
synced 2024-10-13 11:42:54 +00:00
Fix non-local-engine Linux release builds (#58372)
This commit is contained in:
parent
1d395c5e18
commit
a3b9e20a6b
|
@ -23,8 +23,6 @@ const List<String> _kLinuxArtifacts = <String>[
|
|||
'flutter_glfw.h',
|
||||
// GTK. Not yet used by the template.
|
||||
'libflutter_linux_gtk.so',
|
||||
// Shared.
|
||||
'icudtl.dat',
|
||||
];
|
||||
|
||||
const String _kLinuxDepfile = 'linux_engine_sources.d';
|
||||
|
@ -86,6 +84,10 @@ class UnpackLinux extends Target {
|
|||
outputDirectory: outputDirectory,
|
||||
artifacts: _kLinuxArtifacts,
|
||||
clientSourcePaths: <String>[clientSourcePath, headersPath],
|
||||
icuDataPath: environment.artifacts.getArtifactPath(
|
||||
Artifact.icuData,
|
||||
platform: TargetPlatform.linux_x64,
|
||||
)
|
||||
);
|
||||
final DepfileService depfileService = DepfileService(
|
||||
fileSystem: environment.fileSystem,
|
||||
|
|
|
@ -1392,7 +1392,11 @@ const List<List<String>> _windowsDesktopBinaryDirs = <List<String>>[
|
|||
const List<List<String>> _linuxDesktopBinaryDirs = <List<String>>[
|
||||
<String>['linux-x64', 'linux-x64/linux-x64-flutter-glfw.zip'],
|
||||
<String>['linux-x64', 'linux-x64/flutter-cpp-client-wrapper-glfw.zip'],
|
||||
<String>['linux-x64-profile', 'linux-x64-profile/linux-x64-flutter-glfw.zip'],
|
||||
<String>['linux-x64-release', 'linux-x64-release/linux-x64-flutter-glfw.zip'],
|
||||
<String>['linux-x64', 'linux-x64/linux-x64-flutter-gtk.zip'],
|
||||
<String>['linux-x64-profile', 'linux-x64-profile/linux-x64-flutter-gtk.zip'],
|
||||
<String>['linux-x64-release', 'linux-x64-release/linux-x64-flutter-gtk.zip'],
|
||||
];
|
||||
|
||||
const List<List<String>> _macOSDesktopBinaryDirs = <List<String>>[
|
||||
|
|
|
@ -36,6 +36,11 @@ void main() {
|
|||
mode: anyNamed('mode'),
|
||||
platform: anyNamed('platform'),
|
||||
)).thenReturn('linux-x64/flutter_linux');
|
||||
when(mockArtifacts.getArtifactPath(
|
||||
Artifact.icuData,
|
||||
mode: anyNamed('mode'),
|
||||
platform: anyNamed('platform'),
|
||||
)).thenReturn(r'linux-x64/icudtl.dat');
|
||||
|
||||
final Environment testEnvironment = Environment.test(
|
||||
fileSystem.currentDirectory,
|
||||
|
|
|
@ -611,6 +611,19 @@ void main() {
|
|||
|
||||
expect(artifacts.getBinaryDirs(), isNotEmpty);
|
||||
});
|
||||
|
||||
testWithoutContext('Linux desktop artifacts include profile and release artifacts', () {
|
||||
final MockCache mockCache = MockCache();
|
||||
final LinuxEngineArtifacts artifacts = LinuxEngineArtifacts(
|
||||
mockCache,
|
||||
platform: FakePlatform(operatingSystem: 'linux'),
|
||||
);
|
||||
|
||||
expect(artifacts.getBinaryDirs(), containsAll(<Matcher>[
|
||||
contains(contains('profile')),
|
||||
contains(contains('release')),
|
||||
]));
|
||||
});
|
||||
}
|
||||
|
||||
class FakeCachedArtifact extends EngineCachedArtifact {
|
||||
|
|
Loading…
Reference in a new issue