mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix xcode build settings parsing (#14672)
This commit is contained in:
parent
ea4dc12486
commit
8507b72af5
@ -12,7 +12,7 @@ import '../build_info.dart';
|
||||
import '../cache.dart';
|
||||
import '../globals.dart';
|
||||
|
||||
final RegExp _settingExpr = new RegExp(r'(\w+)\s*=\s*(\S+)');
|
||||
final RegExp _settingExpr = new RegExp(r'(\w+)\s*=\s*(.*)$');
|
||||
final RegExp _varExpr = new RegExp(r'\$\((.*)\)');
|
||||
|
||||
String flutterFrameworkDir(BuildMode mode) {
|
||||
@ -77,9 +77,10 @@ Map<String, String> getXcodeBuildSettings(String xcodeProjPath, String target) {
|
||||
|
||||
Map<String, String> parseXcodeBuildSettings(String showBuildSettingsOutput) {
|
||||
final Map<String, String> settings = <String, String>{};
|
||||
for (String line in showBuildSettingsOutput.split('\n').where(_settingExpr.hasMatch)) {
|
||||
final Match match = _settingExpr.firstMatch(line);
|
||||
settings[match[1]] = match[2];
|
||||
for (Match match in showBuildSettingsOutput.split('\n').map(_settingExpr.firstMatch)) {
|
||||
if (match != null) {
|
||||
settings[match[1]] = match[2];
|
||||
}
|
||||
}
|
||||
return settings;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user