Set BUILD_DIR when determining if plugins support arm64 simulators (#90088)

This commit is contained in:
Jenn Magder
2021-09-15 18:37:04 -07:00
committed by GitHub
parent bf66cc2e08
commit ab6f2fc8ce
5 changed files with 21 additions and 0 deletions

View File

@@ -499,6 +499,13 @@ void _validateIosPodfile(String appPath) {
'test_plugin_swift',
'ios',
));
// Make sure no Xcode build settings are leaking derived data/build directory into the ios directory.
checkDirectoryNotExists(path.join(
appPath,
'ios',
'build',
));
}
void _validateMacOSPodfile(String appPath) {

View File

@@ -228,6 +228,7 @@ class XcodeProjectInterpreter {
return null;
}
final Status status = _logger.startSpinner();
final String buildDirectory = _fileSystem.path.absolute(getIosBuildDirectory());
final List<String> showBuildSettingsCommand = <String>[
...xcrunCommand(),
'xcodebuild',
@@ -237,6 +238,8 @@ class XcodeProjectInterpreter {
'-project',
podXcodeProject.path,
'-showBuildSettings',
'BUILD_DIR=$buildDirectory',
'OBJROOT=$buildDirectory',
];
try {
// showBuildSettings is reported to occasionally timeout. Here, we give it

View File

@@ -1,3 +1,4 @@
**/dgph
*.mode1v3
*.mode2v3
*.moved-aside

View File

@@ -3,4 +3,5 @@
**/Pods/
# Xcode-related
**/dgph
**/xcuserdata/

View File

@@ -695,6 +695,7 @@ Information about project "Runner":
final Directory podXcodeProject = project.ios.hostAppRoot.childDirectory('Pods').childDirectory('Pods.xcodeproj')
..createSync(recursive: true);
final String buildDirectory = fileSystem.path.absolute('build', 'ios');
fakeProcessManager.addCommands(<FakeCommand>[
kWhichSysctlCommand,
kARMCheckCommand,
@@ -710,6 +711,8 @@ Information about project "Runner":
'-project',
podXcodeProject.path,
'-showBuildSettings',
'BUILD_DIR=$buildDirectory',
'OBJROOT=$buildDirectory',
],
stdout: '''
Build settings for action build and target plugin1:
@@ -748,6 +751,7 @@ Build settings for action build and target plugin2:
final Directory podXcodeProject = project.ios.hostAppRoot.childDirectory('Pods').childDirectory('Pods.xcodeproj')
..createSync(recursive: true);
final String buildDirectory = fileSystem.path.absolute('build', 'ios');
fakeProcessManager.addCommands(<FakeCommand>[
kWhichSysctlCommand,
kARMCheckCommand,
@@ -763,6 +767,8 @@ Build settings for action build and target plugin2:
'-project',
podXcodeProject.path,
'-showBuildSettings',
'BUILD_DIR=$buildDirectory',
'OBJROOT=$buildDirectory',
],
exitCode: 1,
),
@@ -789,6 +795,7 @@ Build settings for action build and target plugin2:
final Directory podXcodeProject = project.ios.hostAppRoot.childDirectory('Pods').childDirectory('Pods.xcodeproj')
..createSync(recursive: true);
final String buildDirectory = fileSystem.path.absolute('build', 'ios');
fakeProcessManager.addCommands(<FakeCommand>[
kWhichSysctlCommand,
kARMCheckCommand,
@@ -804,6 +811,8 @@ Build settings for action build and target plugin2:
'-project',
podXcodeProject.path,
'-showBuildSettings',
'BUILD_DIR=$buildDirectory',
'OBJROOT=$buildDirectory',
],
stdout: '''
Build settings for action build and target plugin1: