mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-11-10 06:14:38 +03:00
sort carthage dependencies
This commit is contained in:
parent
d1efa9ac64
commit
f6d6f17f1b
@ -381,14 +381,16 @@ public class PBXProjGenerator {
|
||||
buildPhases.append(copyFilesPhase.reference)
|
||||
}
|
||||
|
||||
let carthageFrameworksToEmbed = carthageDependencies
|
||||
.filter { ($0.embed ?? true) }
|
||||
.map { $0.reference }
|
||||
let carthageFrameworksToEmbed = Array(Set(carthageDependencies
|
||||
.filter { $0.embed ?? true }
|
||||
.map { $0.reference }))
|
||||
.sorted()
|
||||
|
||||
if !carthageFrameworksToEmbed.isEmpty {
|
||||
|
||||
if target.type.isApp && target.platform != .macOS {
|
||||
let inputPaths = Set(carthageFrameworksToEmbed).map { "$(SRCROOT)/\(carthageBuildPath)/\(target.platform)/\($0)\($0.contains(".") ? "" : ".framework")" }
|
||||
let outputPaths = Set(carthageFrameworksToEmbed).map { "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/\($0)\($0.contains(".") ? "" : ".framework")" }
|
||||
let inputPaths = carthageFrameworksToEmbed.map { "$(SRCROOT)/\(carthageBuildPath)/\(target.platform)/\($0)\($0.contains(".") ? "" : ".framework")" }
|
||||
let outputPaths = carthageFrameworksToEmbed.map { "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/\($0)\($0.contains(".") ? "" : ".framework")" }
|
||||
let carthageScript = PBXShellScriptBuildPhase(reference: generateUUID(PBXShellScriptBuildPhase.self, "Carthage" + target.name), files: [], name: "Carthage", inputPaths: inputPaths, outputPaths: outputPaths, shellPath: "/bin/sh", shellScript: "/usr/local/bin/carthage copy-frameworks\n")
|
||||
addObject(carthageScript)
|
||||
buildPhases.append(carthageScript.reference)
|
||||
|
Loading…
Reference in New Issue
Block a user