mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
change from XCTest to Spectre
This commit is contained in:
@@ -8,8 +8,16 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public enum SpecError: Error {
|
||||
public enum SpecError: Error, CustomStringConvertible {
|
||||
case unknownTargetType(String)
|
||||
case unknownTargetPlatform(String)
|
||||
case invalidDependency([String: Any])
|
||||
|
||||
public var description: String {
|
||||
switch self {
|
||||
case let .unknownTargetType(type): return "Unknown Target type: \(type)"
|
||||
case let .unknownTargetPlatform(platform): return "Unknown Target platform: \(platform)"
|
||||
case let .invalidDependency(dependency): return "Unknown Target dependency: \(dependency)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,11 @@ extension Target: JSONObjectConvertible {
|
||||
sources = jsonDictionary.json(atKeyPath: "sources") ?? []
|
||||
}
|
||||
sourceExludes = jsonDictionary.json(atKeyPath: "sourceExludes") ?? []
|
||||
dependencies = jsonDictionary.json(atKeyPath: "dependencies") ?? []
|
||||
if jsonDictionary["dependencies"] == nil {
|
||||
dependencies = []
|
||||
} else {
|
||||
dependencies = try jsonDictionary.json(atKeyPath: "dependencies", invalidItemBehaviour: .fail)
|
||||
}
|
||||
prebuildScripts = jsonDictionary.json(atKeyPath: "prebuildScripts") ?? []
|
||||
postbuildScripts = jsonDictionary.json(atKeyPath: "postbuildScripts") ?? []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user