mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-09-11 12:56:03 +03:00
Reuse ReferenceProxy references when possible (#1354)
* Reuse ReferenceProxy references when possible * Add changelog * Update CHANGELOG.md --------- Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
This commit is contained in:
parent
9766326dcd
commit
372f20fe5a
@ -2,12 +2,18 @@
|
||||
|
||||
## Next Version
|
||||
|
||||
### Added
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix external dependencies from being removed by Xcode #1354 @OdNairy
|
||||
|
||||
## 2.35.0
|
||||
|
||||
### Added
|
||||
|
||||
- Added support for shared breakpoints #177 @alexruperez @myihsan
|
||||
- Added support for `putResourcesBeforeSourcesBuildPhase` in a target #1351 @mat1th
|
||||
- Added support for `putResourcesBeforeSourcesBuildPhase` in a target #1351 @mat1th
|
||||
|
||||
### Fixed
|
||||
|
||||
|
@ -423,16 +423,32 @@ public class PBXProjGenerator {
|
||||
path = "lib\(tmpPath)"
|
||||
}
|
||||
|
||||
let productReferenceProxy = addObject(
|
||||
PBXReferenceProxy(
|
||||
fileType: targetObject.productNameWithExtension().flatMap { Xcode.fileType(path: Path($0)) },
|
||||
path: path,
|
||||
remote: productProxy,
|
||||
sourceTree: .buildProductsDir
|
||||
)
|
||||
)
|
||||
let productReferenceProxyFileType = targetObject.productNameWithExtension()
|
||||
.flatMap { Xcode.fileType(path: Path($0)) }
|
||||
|
||||
let existingValue = self.pbxProj.referenceProxies.first { referenceProxy in
|
||||
referenceProxy.path == path &&
|
||||
referenceProxy.remote == productProxy &&
|
||||
referenceProxy.sourceTree == .buildProductsDir &&
|
||||
referenceProxy.fileType == productReferenceProxyFileType
|
||||
}
|
||||
|
||||
let productReferenceProxy: PBXReferenceProxy
|
||||
if let existingValue = existingValue {
|
||||
productReferenceProxy = existingValue
|
||||
} else {
|
||||
productReferenceProxy = addObject(
|
||||
PBXReferenceProxy(
|
||||
fileType: productReferenceProxyFileType,
|
||||
path: path,
|
||||
remote: productProxy,
|
||||
sourceTree: .buildProductsDir
|
||||
)
|
||||
)
|
||||
|
||||
productsGroup.children.append(productReferenceProxy)
|
||||
}
|
||||
|
||||
productsGroup.children.append(productReferenceProxy)
|
||||
|
||||
let targetDependency = addObject(
|
||||
PBXTargetDependency(
|
||||
|
Loading…
Reference in New Issue
Block a user