[xcodegen] Avoid buildable folders for mixed Swift targets

If a Swift target has sources in its folder that
aren't part of the target, we can't form a buildable
folder.
This commit is contained in:
Hamish Knight
2024-12-14 19:53:51 +00:00
parent 54bf65b2e9
commit 486cd42bba
2 changed files with 17 additions and 4 deletions

View File

@@ -127,6 +127,10 @@ extension PathProtocol {
hasExtension(.c, .cpp, .m, .mm)
}
var isSourceLike: Bool {
isCSourceLike || hasExtension(.swift)
}
var isDocLike: Bool {
hasExtension(.md, .rst) || fileName.starts(with: "README")
}