Check for Xcode 11 and Xcode 12 directory names in build_ios_framework_module_test (#60045)
This commit is contained in:
parent
c8e53b3859
commit
8b79bb97de
@ -109,14 +109,36 @@ Future<void> main() async {
|
|||||||
}
|
}
|
||||||
await _checkFrameworkArchs(debugAppFrameworkPath, 'Debug');
|
await _checkFrameworkArchs(debugAppFrameworkPath, 'Debug');
|
||||||
|
|
||||||
checkFileExists(path.join(
|
// Xcode changed the name of this generated directory in Xcode 12.
|
||||||
|
const String xcode11ArmDirectoryName = 'ios-armv7_arm64';
|
||||||
|
const String xcode12ArmDirectoryName = 'ios-arm64_armv7';
|
||||||
|
|
||||||
|
final String xcode11AppFrameworkDirectory = path.join(
|
||||||
outputPath,
|
outputPath,
|
||||||
'Debug',
|
'Debug',
|
||||||
'App.xcframework',
|
'App.xcframework',
|
||||||
'ios-armv7_arm64',
|
xcode11ArmDirectoryName,
|
||||||
'App.framework',
|
'App.framework',
|
||||||
'App',
|
'App',
|
||||||
));
|
);
|
||||||
|
final String xcode12AppFrameworkDirectory = path.join(
|
||||||
|
outputPath,
|
||||||
|
'Debug',
|
||||||
|
'App.xcframework',
|
||||||
|
xcode12ArmDirectoryName,
|
||||||
|
'App.framework',
|
||||||
|
'App',
|
||||||
|
);
|
||||||
|
|
||||||
|
// This seemed easier than an explicit Xcode version check.
|
||||||
|
String xcodeArmDirectoryName;
|
||||||
|
if (exists(File(xcode11AppFrameworkDirectory))) {
|
||||||
|
xcodeArmDirectoryName = xcode11ArmDirectoryName;
|
||||||
|
} else if (exists(File(xcode12AppFrameworkDirectory))) {
|
||||||
|
xcodeArmDirectoryName = xcode12ArmDirectoryName;
|
||||||
|
} else {
|
||||||
|
throw const FileSystemException('Expected App.framework binary to exist.');
|
||||||
|
}
|
||||||
|
|
||||||
checkFileExists(path.join(
|
checkFileExists(path.join(
|
||||||
outputPath,
|
outputPath,
|
||||||
@ -158,7 +180,7 @@ Future<void> main() async {
|
|||||||
outputPath,
|
outputPath,
|
||||||
mode,
|
mode,
|
||||||
'App.xcframework',
|
'App.xcframework',
|
||||||
'ios-armv7_arm64',
|
xcodeArmDirectoryName,
|
||||||
'App.framework',
|
'App.framework',
|
||||||
'App',
|
'App',
|
||||||
));
|
));
|
||||||
@ -190,7 +212,7 @@ Future<void> main() async {
|
|||||||
outputPath,
|
outputPath,
|
||||||
mode,
|
mode,
|
||||||
'Flutter.xcframework',
|
'Flutter.xcframework',
|
||||||
'ios-armv7_arm64',
|
xcodeArmDirectoryName,
|
||||||
'Flutter.framework',
|
'Flutter.framework',
|
||||||
'Flutter',
|
'Flutter',
|
||||||
));
|
));
|
||||||
@ -234,7 +256,7 @@ Future<void> main() async {
|
|||||||
outputPath,
|
outputPath,
|
||||||
mode,
|
mode,
|
||||||
'device_info.xcframework',
|
'device_info.xcframework',
|
||||||
'ios-armv7_arm64',
|
xcodeArmDirectoryName,
|
||||||
'device_info.framework',
|
'device_info.framework',
|
||||||
'device_info',
|
'device_info',
|
||||||
));
|
));
|
||||||
@ -243,7 +265,7 @@ Future<void> main() async {
|
|||||||
outputPath,
|
outputPath,
|
||||||
mode,
|
mode,
|
||||||
'device_info.xcframework',
|
'device_info.xcframework',
|
||||||
'ios-armv7_arm64',
|
xcodeArmDirectoryName,
|
||||||
'device_info.framework',
|
'device_info.framework',
|
||||||
'Headers',
|
'Headers',
|
||||||
'DeviceInfoPlugin.h',
|
'DeviceInfoPlugin.h',
|
||||||
@ -301,7 +323,7 @@ Future<void> main() async {
|
|||||||
outputPath,
|
outputPath,
|
||||||
mode,
|
mode,
|
||||||
'FlutterPluginRegistrant.xcframework',
|
'FlutterPluginRegistrant.xcframework',
|
||||||
'ios-armv7_arm64',
|
xcodeArmDirectoryName,
|
||||||
'FlutterPluginRegistrant.framework',
|
'FlutterPluginRegistrant.framework',
|
||||||
'Headers',
|
'Headers',
|
||||||
'GeneratedPluginRegistrant.h',
|
'GeneratedPluginRegistrant.h',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user