`xcodebuild build-for-testing` does not work when there are build plugins and multiple destinations

Hello, we recently added a build plugin to our swift package and we have a Xcode project that uses the swift package as a dependency and we build that Xcode project from the command line using xcodebuild build-for-testing. After we added that build plugin to the swift package, xcodebuild now fails and says this:

If I remove that build plugin from the swift package then xcodebuild build-for-testing will build successfullly. It is also worth noting then when we run the xcodebuild build-for-testing command we pass in multiple -destination flags. If we pass one -destination flag then xcodebuild succeeds even with the build plugin. So it seems like the issue is around having multiple destination flags and a build plugin added.

This sounds like a bug within xcodebuild. Any thoughts or ideas on why this isn't working would be helpful!

Here is an example of what our full xcodebuild command looks like:

xcodebuild build-for-testing 
-project “SomeProject” 
-scheme “SomeScheme”  
-configuration Debug 
-destination ‘SomeDestination1’
-destination ‘SomeDestination2’
-destination ‘SomeDestination3’ 
-disableAutomaticPackageResolution 
-onlyUsePackageVersionsFromResolvedFile 
-skipPackageUpdates 
-skipPackagePluginValidation 
-allowProvisioningUpdates DEVELOPMENT_TEAM=SomeTeam

Thank you!

`xcodebuild build-for-testing` does not work when there are build plugins and multiple destinations
 
 
Q