mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
rename includeCarthageRelatedDependencies to findCarthageFrameworks and includeRelated to findFrameworks
This commit is contained in:
@@ -33,7 +33,7 @@ public struct Dependency: Equatable {
|
||||
public enum DependencyType: Equatable {
|
||||
case target
|
||||
case framework
|
||||
case carthage(includeRelated: Bool?)
|
||||
case carthage(findFrameworks: Bool?)
|
||||
case sdk
|
||||
}
|
||||
}
|
||||
@@ -54,8 +54,8 @@ extension Dependency: JSONObjectConvertible {
|
||||
type = .framework
|
||||
reference = framework
|
||||
} else if let carthage: String = jsonDictionary.json(atKeyPath: "carthage") {
|
||||
let includeRelated: Bool? = jsonDictionary.json(atKeyPath: "includeRelated")
|
||||
type = .carthage(includeRelated: includeRelated)
|
||||
let findFrameworks: Bool? = jsonDictionary.json(atKeyPath: "findFrameworks")
|
||||
type = .carthage(findFrameworks: findFrameworks)
|
||||
reference = carthage
|
||||
} else if let sdk: String = jsonDictionary.json(atKeyPath: "sdk") {
|
||||
type = .sdk
|
||||
|
||||
@@ -20,7 +20,7 @@ public struct SpecOptions: Equatable {
|
||||
public var transitivelyLinkDependencies: Bool
|
||||
public var groupSortPosition: GroupSortPosition
|
||||
public var generateEmptyDirectories: Bool
|
||||
public var includeCarthageRelatedDependencies: Bool
|
||||
public var findCarthageFrameworks: Bool
|
||||
|
||||
public enum ValidationType: String {
|
||||
case missingConfigs
|
||||
@@ -76,7 +76,7 @@ public struct SpecOptions: Equatable {
|
||||
transitivelyLinkDependencies: Bool = false,
|
||||
groupSortPosition: GroupSortPosition = .bottom,
|
||||
generateEmptyDirectories: Bool = false,
|
||||
includeCarthageRelatedDependencies: Bool = false
|
||||
findCarthageFrameworks: Bool = false
|
||||
) {
|
||||
self.minimumXcodeGenVersion = minimumXcodeGenVersion
|
||||
self.carthageBuildPath = carthageBuildPath
|
||||
@@ -95,7 +95,7 @@ public struct SpecOptions: Equatable {
|
||||
self.transitivelyLinkDependencies = transitivelyLinkDependencies
|
||||
self.groupSortPosition = groupSortPosition
|
||||
self.generateEmptyDirectories = generateEmptyDirectories
|
||||
self.includeCarthageRelatedDependencies = includeCarthageRelatedDependencies
|
||||
self.findCarthageFrameworks = findCarthageFrameworks
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ extension SpecOptions: JSONObjectConvertible {
|
||||
transitivelyLinkDependencies = jsonDictionary.json(atKeyPath: "transitivelyLinkDependencies") ?? false
|
||||
groupSortPosition = jsonDictionary.json(atKeyPath: "groupSortPosition") ?? .bottom
|
||||
generateEmptyDirectories = jsonDictionary.json(atKeyPath: "generateEmptyDirectories") ?? false
|
||||
includeCarthageRelatedDependencies = jsonDictionary.json(atKeyPath: "includeCarthageRelatedDependencies") ?? false
|
||||
findCarthageFrameworks = jsonDictionary.json(atKeyPath: "findCarthageFrameworks") ?? false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,9 +53,9 @@ public class CarthageDependencyResolver {
|
||||
let nonExistentDependencies = target.dependencies.filter { !frameworks.contains($0) }
|
||||
for dependency in nonExistentDependencies {
|
||||
switch dependency.type {
|
||||
case .carthage(let includeRelated):
|
||||
let includeRelated = includeRelated ?? project.options.includeCarthageRelatedDependencies
|
||||
if includeRelated {
|
||||
case .carthage(let findFrameworks):
|
||||
let findFrameworks = findFrameworks ?? project.options.findCarthageFrameworks
|
||||
if findFrameworks {
|
||||
relatedDependencies(for: dependency, in: target.platform)
|
||||
.filter { !frameworks.contains($0) }
|
||||
.forEach { frameworks.insert($0) }
|
||||
|
||||
@@ -576,9 +576,9 @@ public class PBXProjGenerator {
|
||||
)
|
||||
targetFrameworkBuildFiles.append(buildFile)
|
||||
|
||||
case .carthage(let includeRelated):
|
||||
let includeRelated = includeRelated ?? project.options.includeCarthageRelatedDependencies
|
||||
let allDependencies = includeRelated
|
||||
case .carthage(let findFrameworks):
|
||||
let findFrameworks = findFrameworks ?? project.options.findCarthageFrameworks
|
||||
let allDependencies = findFrameworks
|
||||
? carthageResolver.relatedDependencies(for: dependency, in: target.platform) : [dependency]
|
||||
allDependencies.forEach { dependency in
|
||||
// Static libraries can't link or embed dynamic frameworks
|
||||
|
||||
Reference in New Issue
Block a user