Unverified Commit ab6f2fc8 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

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

parent bf66cc2e
...@@ -499,6 +499,13 @@ void _validateIosPodfile(String appPath) { ...@@ -499,6 +499,13 @@ void _validateIosPodfile(String appPath) {
'test_plugin_swift', 'test_plugin_swift',
'ios', '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) { void _validateMacOSPodfile(String appPath) {
......
...@@ -228,6 +228,7 @@ class XcodeProjectInterpreter { ...@@ -228,6 +228,7 @@ class XcodeProjectInterpreter {
return null; return null;
} }
final Status status = _logger.startSpinner(); final Status status = _logger.startSpinner();
final String buildDirectory = _fileSystem.path.absolute(getIosBuildDirectory());
final List<String> showBuildSettingsCommand = <String>[ final List<String> showBuildSettingsCommand = <String>[
...xcrunCommand(), ...xcrunCommand(),
'xcodebuild', 'xcodebuild',
...@@ -237,6 +238,8 @@ class XcodeProjectInterpreter { ...@@ -237,6 +238,8 @@ class XcodeProjectInterpreter {
'-project', '-project',
podXcodeProject.path, podXcodeProject.path,
'-showBuildSettings', '-showBuildSettings',
'BUILD_DIR=$buildDirectory',
'OBJROOT=$buildDirectory',
]; ];
try { try {
// showBuildSettings is reported to occasionally timeout. Here, we give it // showBuildSettings is reported to occasionally timeout. Here, we give it
......
**/dgph
*.mode1v3 *.mode1v3
*.mode2v3 *.mode2v3
*.moved-aside *.moved-aside
......
...@@ -3,4 +3,5 @@ ...@@ -3,4 +3,5 @@
**/Pods/ **/Pods/
# Xcode-related # Xcode-related
**/dgph
**/xcuserdata/ **/xcuserdata/
...@@ -695,6 +695,7 @@ Information about project "Runner": ...@@ -695,6 +695,7 @@ Information about project "Runner":
final Directory podXcodeProject = project.ios.hostAppRoot.childDirectory('Pods').childDirectory('Pods.xcodeproj') final Directory podXcodeProject = project.ios.hostAppRoot.childDirectory('Pods').childDirectory('Pods.xcodeproj')
..createSync(recursive: true); ..createSync(recursive: true);
final String buildDirectory = fileSystem.path.absolute('build', 'ios');
fakeProcessManager.addCommands(<FakeCommand>[ fakeProcessManager.addCommands(<FakeCommand>[
kWhichSysctlCommand, kWhichSysctlCommand,
kARMCheckCommand, kARMCheckCommand,
...@@ -710,6 +711,8 @@ Information about project "Runner": ...@@ -710,6 +711,8 @@ Information about project "Runner":
'-project', '-project',
podXcodeProject.path, podXcodeProject.path,
'-showBuildSettings', '-showBuildSettings',
'BUILD_DIR=$buildDirectory',
'OBJROOT=$buildDirectory',
], ],
stdout: ''' stdout: '''
Build settings for action build and target plugin1: Build settings for action build and target plugin1:
...@@ -748,6 +751,7 @@ Build settings for action build and target plugin2: ...@@ -748,6 +751,7 @@ Build settings for action build and target plugin2:
final Directory podXcodeProject = project.ios.hostAppRoot.childDirectory('Pods').childDirectory('Pods.xcodeproj') final Directory podXcodeProject = project.ios.hostAppRoot.childDirectory('Pods').childDirectory('Pods.xcodeproj')
..createSync(recursive: true); ..createSync(recursive: true);
final String buildDirectory = fileSystem.path.absolute('build', 'ios');
fakeProcessManager.addCommands(<FakeCommand>[ fakeProcessManager.addCommands(<FakeCommand>[
kWhichSysctlCommand, kWhichSysctlCommand,
kARMCheckCommand, kARMCheckCommand,
...@@ -763,6 +767,8 @@ Build settings for action build and target plugin2: ...@@ -763,6 +767,8 @@ Build settings for action build and target plugin2:
'-project', '-project',
podXcodeProject.path, podXcodeProject.path,
'-showBuildSettings', '-showBuildSettings',
'BUILD_DIR=$buildDirectory',
'OBJROOT=$buildDirectory',
], ],
exitCode: 1, exitCode: 1,
), ),
...@@ -789,6 +795,7 @@ Build settings for action build and target plugin2: ...@@ -789,6 +795,7 @@ Build settings for action build and target plugin2:
final Directory podXcodeProject = project.ios.hostAppRoot.childDirectory('Pods').childDirectory('Pods.xcodeproj') final Directory podXcodeProject = project.ios.hostAppRoot.childDirectory('Pods').childDirectory('Pods.xcodeproj')
..createSync(recursive: true); ..createSync(recursive: true);
final String buildDirectory = fileSystem.path.absolute('build', 'ios');
fakeProcessManager.addCommands(<FakeCommand>[ fakeProcessManager.addCommands(<FakeCommand>[
kWhichSysctlCommand, kWhichSysctlCommand,
kARMCheckCommand, kARMCheckCommand,
...@@ -804,6 +811,8 @@ Build settings for action build and target plugin2: ...@@ -804,6 +811,8 @@ Build settings for action build and target plugin2:
'-project', '-project',
podXcodeProject.path, podXcodeProject.path,
'-showBuildSettings', '-showBuildSettings',
'BUILD_DIR=$buildDirectory',
'OBJROOT=$buildDirectory',
], ],
stdout: ''' stdout: '''
Build settings for action build and target plugin1: Build settings for action build and target plugin1:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment