diff --git a/.swift-version b/.swift-version index bf77d54..8336407 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.2 +5.1 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 6c7c10a..2126fa4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -osx_image: xcode10 +osx_image: xcode11.3 language: objective-c sudo: required branches: @@ -15,10 +15,10 @@ env: - SCHEME="Deli" - FRAMEWORK="Deli" matrix: - - TEST=1 DESTINATION="platform=iOS Simulator,name=iPhone 8,OS=12.0" + - TEST=1 DESTINATION="platform=iOS Simulator,name=iPhone 8,OS=13.3" - TEST=1 DESTINATION="arch=x86_64" - - TEST=1 DESTINATION="OS=12.0,name=Apple TV" - - TEST=0 DESTINATION="OS=5.0,name=Apple Watch Series 4 - 40mm" + - TEST=1 DESTINATION="OS=13.3,name=Apple TV" + - TEST=0 DESTINATION="OS=6.0,name=Apple Watch Series 4 - 40mm" install: - eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)" diff --git a/Binary/Package.resolved b/Binary/Package.resolved index be80e90..026c732 100644 --- a/Binary/Package.resolved +++ b/Binary/Package.resolved @@ -3,11 +3,11 @@ "pins": [ { "package": "AEXML", - "repositoryURL": "https://github.com/tadija/AEXML.git", + "repositoryURL": "https://github.com/tadija/AEXML", "state": { "branch": null, - "revision": "6eea665515d079c338690147082a8084a36484b0", - "version": "4.3.0" + "revision": "e4d517844dd03dac557e35d77a8e9ab438de91a6", + "version": "4.4.0" } }, { @@ -15,8 +15,26 @@ "repositoryURL": "https://github.com/Carthage/Commandant.git", "state": { "branch": null, - "revision": "07cad52573bad19d95844035bf0b25acddf6b0f6", - "version": "0.15.0" + "revision": "ab68611013dec67413628ac87c1f29e8427bc8e4", + "version": "0.17.0" + } + }, + { + "package": "CwlCatchException", + "repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git", + "state": { + "branch": null, + "revision": "7cd2f8cacc4d22f21bc0b2309c3b18acf7957b66", + "version": "1.2.0" + } + }, + { + "package": "CwlPreconditionTesting", + "repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git", + "state": { + "branch": null, + "revision": "c228db5d2ad1b01ebc84435e823e6cca4e3db98b", + "version": "1.2.0" } }, { @@ -24,35 +42,35 @@ "repositoryURL": "https://github.com/Quick/Nimble.git", "state": { "branch": null, - "revision": "cd6dfb86f496fcd96ce0bc6da962cd936bf41903", - "version": "7.3.1" + "revision": "b02b00b30b6353632aa4a5fb6124f8147f7140c0", + "version": "8.0.5" } }, { - "package": "Quick", - "repositoryURL": "https://github.com/Quick/Quick.git", + "package": "PathKit", + "repositoryURL": "https://github.com/kylef/PathKit", "state": { "branch": null, - "revision": "5fbf13871d185526993130c3a1fad0b70bfe37ce", - "version": "1.3.2" + "revision": "73f8e9dca9b7a3078cb79128217dc8f2e585a511", + "version": "1.0.0" } }, { - "package": "Regex", - "repositoryURL": "https://github.com/crossroadlabs/Regex.git", + "package": "Quick", + "repositoryURL": "https://github.com/Quick/Quick.git", "state": { "branch": null, - "revision": "f144250678e4c13f1d820ffa265a8326b25bcd86", - "version": "1.1.0" + "revision": "33682c2f6230c60614861dfc61df267e11a1602f", + "version": "2.2.0" } }, { - "package": "Result", - "repositoryURL": "https://github.com/antitypical/Result.git", + "package": "Regex", + "repositoryURL": "https://github.com/crossroadlabs/Regex.git", "state": { "branch": null, - "revision": "8fc088dcf72802801efeecba76ea8fb041fb773d", - "version": "4.0.0" + "revision": "166728756082a9cac6e4aed3ebbce8e41cb3a945", + "version": "1.2.0" } }, { @@ -60,17 +78,17 @@ "repositoryURL": "https://github.com/jpsim/SourceKitten.git", "state": { "branch": null, - "revision": "4be914be6fa49cd30b1e7ef5d32d06c037d8f469", - "version": "0.21.2" + "revision": "97b5848e5692150d75b5cf0b81d7ebef5f4d5071", + "version": "0.28.0" } }, { - "package": "SwiftPM", - "repositoryURL": "https://github.com/apple/swift-package-manager", + "package": "Spectre", + "repositoryURL": "https://github.com/kylef/Spectre.git", "state": { "branch": null, - "revision": "6983434787dec4e543e9d398a0a9acf63ccd4da1", - "version": "0.2.1" + "revision": "f14ff47f45642aa5703900980b014c2e9394b6e5", + "version": "0.9.0" } }, { @@ -78,17 +96,17 @@ "repositoryURL": "https://github.com/drmohundro/SWXMLHash.git", "state": { "branch": null, - "revision": "0ce63a93a455adb3cd5e4c55f78f1232a590a5a5", - "version": "4.7.2" + "revision": "a4931e5c3bafbedeb1601d3bb76bbe835c6d475a", + "version": "5.0.1" } }, { - "package": "xcodeproj", + "package": "XcodeProj", "repositoryURL": "https://github.com/tuist/xcodeproj.git", "state": { "branch": null, - "revision": "b645d432f79303a805c65cf712b9d185dff6f25c", - "version": "6.0.0" + "revision": "23f7e12a7e0db29b4f16052692d99f9fbe41fa15", + "version": "7.5.0" } }, { @@ -96,8 +114,8 @@ "repositoryURL": "https://github.com/jpsim/Yams.git", "state": { "branch": null, - "revision": "26ab35f50ea891e8edefcc9d975db2f6b67e1d68", - "version": "1.0.1" + "revision": "c947a306d2e80ecb2c0859047b35c73b8e1ca27f", + "version": "2.0.0" } } ] diff --git a/Binary/Package.swift b/Binary/Package.swift index 5b9bae1..8d86009 100644 --- a/Binary/Package.swift +++ b/Binary/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:4.0 +// swift-tools-version:5.0 import PackageDescription let package = Package( @@ -7,11 +7,11 @@ let package = Package( .executable(name: "deli", targets: ["deli"]) ], dependencies: [ - .package(url: "https://github.com/jpsim/SourceKitten.git", from: "0.21.1"), - .package(url: "https://github.com/jpsim/Yams.git", from: "1.0.0"), - .package(url: "https://github.com/crossroadlabs/Regex.git", from: "1.1.0"), - .package(url: "https://github.com/tuist/xcodeproj.git", from: "6.0.0"), - .package(url: "https://github.com/Carthage/Commandant.git", from: "0.15.0") + .package(url: "https://github.com/jpsim/SourceKitten.git", from: "0.28.0"), + .package(url: "https://github.com/jpsim/Yams.git", from: "2.0.0"), + .package(url: "https://github.com/crossroadlabs/Regex.git", from: "1.2.0"), + .package(url: "https://github.com/tuist/xcodeproj.git", from: "7.5.0"), + .package(url: "https://github.com/Carthage/Commandant.git", from: "0.17.0") ], targets: [ .target( @@ -20,7 +20,7 @@ let package = Package( "SourceKittenFramework", "Yams", "Regex", - "xcodeproj", + "XcodeProj", "Commandant" ], path: "Sources/Deli" diff --git a/Binary/Package@swift-4.2.swift b/Binary/Package@swift-4.2.swift deleted file mode 100644 index 26672e8..0000000 --- a/Binary/Package@swift-4.2.swift +++ /dev/null @@ -1,29 +0,0 @@ -// swift-tools-version:4.2 -import PackageDescription - -let package = Package( - name: "Deli", - products: [ - .executable(name: "deli", targets: ["deli"]) - ], - dependencies: [ - .package(url: "https://github.com/jpsim/SourceKitten.git", from: "0.21.1"), - .package(url: "https://github.com/jpsim/Yams.git", from: "1.0.0"), - .package(url: "https://github.com/crossroadlabs/Regex.git", from: "1.1.0"), - .package(url: "https://github.com/tuist/xcodeproj.git", from: "6.0.0"), - .package(url: "https://github.com/Carthage/Commandant.git", from: "0.15.0") - ], - targets: [ - .target( - name: "deli", - dependencies: [ - "SourceKittenFramework", - "Yams", - "Regex", - "xcodeproj", - "Commandant" - ], - path: "Sources/Deli" - ) - ] -) diff --git a/Binary/Sources/Deli/Command/BuildCommand.swift b/Binary/Sources/Deli/Command/BuildCommand.swift index 6748964..367dc74 100644 --- a/Binary/Sources/Deli/Command/BuildCommand.swift +++ b/Binary/Sources/Deli/Command/BuildCommand.swift @@ -5,20 +5,38 @@ import Foundation import Commandant -import Result struct BuildCommand: CommandProtocol { let verb = "build" let function = "Build the Dependency Graph." + func saveOutput(generator: Generator, outputFile: String) throws { + let outputData = try generator.generate() + + var isDirectory: ObjCBool = false + if FileManager.default.fileExists(atPath: outputFile, isDirectory: &isDirectory), isDirectory.boolValue { + Logger.log(.error("Cannot overwrite a directory with an output file: \(outputFile)", nil)) + throw CommandError.cannotOverwriteDirectory + } + try? FileManager.default.removeItem(atPath: outputFile) + try outputData.write(toFile: outputFile, atomically: false, encoding: .utf8) + } + func run(_ options: BuildOptions) -> Result<(), CommandError> { - Logger.isVerbose = options.isVerbose + Logger.isVerbose = options.isDebug || options.isVerbose + Logger.isDebug = options.isDebug let configuration = Configuration() let configure: Config let properties = CommandLine.get(forKey: "property") if let project = options.project { - guard let config = configuration.getConfig(project: project, scheme: options.scheme, target: options.target, output: options.output, properties: properties) else { + guard let config = configuration.getConfig( + project: project, + scheme: options.scheme, + target: options.target, + output: options.output, + properties: properties + ) else { return .failure(.failedToLoadConfigFile) } configure = config @@ -45,6 +63,7 @@ struct BuildCommand: CommandProtocol { Logger.log(.info("Set Target `\(target)`")) let outputFile: String let className: String + let resolvedOutputFile = configuration.getResolvedOutputPath(info: info) if info.className != nil { className = configuration.getClassName(info: info) outputFile = configuration.getOutputPath(info: info, fileName: "\(className).swift") @@ -63,6 +82,7 @@ struct BuildCommand: CommandProtocol { } let propertyParser = PropertyParser() + let resolveParser = ResolveParser() let parser = Parser([ ComponentParser(), ConfigurationParser(), @@ -72,6 +92,8 @@ struct BuildCommand: CommandProtocol { LazyAutowiredFactoryParser(), InjectParser(), InjectPropertyParser(), + DependencyParser(), + PropertyValueParser(), ConfigPropertyParser() ]) let corrector = Corrector([ @@ -91,21 +113,32 @@ struct BuildCommand: CommandProtocol { propertyParser.load(propertyFiles) do { + try resolveParser.load(info.dependencies) + let results = try validator.run( try corrector.run( - try parser.run(sourceFiles) + try resolveParser.run( + try parser.run(sourceFiles) + ) ) ) - let outputData = try SourceGenerator(className: className, results: results, properties: propertyParser.properties).generate() - let url = URL(fileURLWithPath: outputFile) - - var isDirectory: ObjCBool = false - if FileManager.default.fileExists(atPath: outputFile, isDirectory: &isDirectory), isDirectory.boolValue { - Logger.log(.error("Cannot overwrite a directory with an output file: \(outputFile)", nil)) - throw CommandError.cannotOverwriteDirectory + let generator = SourceGenerator( + className: className, + accessControl: info.accessControl, + results: results, + properties: propertyParser.properties + ) + try saveOutput(generator: generator, outputFile: outputFile) + + if options.isResolveFile, (info.resolve?.isGenerate ?? true) { + let resolveGenerator = ResolveGenerator( + projectName: target, + fileName: info.output ?? "\(className).swift", + results: results, + properties: propertyParser.properties + ) + try saveOutput(generator: resolveGenerator, outputFile: resolvedOutputFile) } - try? FileManager.default.removeItem(at: url) - try outputData.write(to: url, atomically: false, encoding: .utf8) Logger.log(.info("Generate file: \(outputFile)")) } catch let error { @@ -125,10 +158,12 @@ struct BuildOptions: OptionsProtocol { let target: String? let output: String? let properties: String? + let isResolveFile: Bool let isVerbose: Bool + let isDebug: Bool - static func create(configFile: String?) -> (_ project: String?) -> (_ scheme: String?) -> (_ target: String?) -> (_ output: String?) -> (_ properties: String?) -> (_ isVerbose: Bool) -> BuildOptions { - return { project in { scheme in { target in { output in { properties in { isVerbose in + static func create(configFile: String?) -> (_ project: String?) -> (_ scheme: String?) -> (_ target: String?) -> (_ output: String?) -> (_ properties: String?) -> (_ isResolveFile: Bool) -> (_ isVerbose: Bool) -> (_ isDebug: Bool) -> BuildOptions { + return { project in { scheme in { target in { output in { properties in { isResolveFile in { isVerbose in { isDebug in self.init( configFile: configFile, project: project, @@ -136,9 +171,11 @@ struct BuildOptions: OptionsProtocol { target: target, output: output, properties: properties, - isVerbose: isVerbose + isResolveFile: isResolveFile, + isVerbose: isVerbose, + isDebug: isDebug ) - }}}}}} + }}}}}}}} } static func evaluate(_ mode: CommandMode) -> Result> { @@ -173,10 +210,20 @@ struct BuildOptions: OptionsProtocol { defaultValue: nil, usage: "the path of property file" ) + <*> mode <| Option( + key: "resolve-file", + defaultValue: true, + usage: "turn on generate resolved file" + ) <*> mode <| Option( key: "verbose", defaultValue: false, usage: "turn on verbose logging" ) + <*> mode <| Option( + key: "debug", + defaultValue: false, + usage: "turn on debug logging" + ) } } diff --git a/Binary/Sources/Deli/Command/GenerateCommand.swift b/Binary/Sources/Deli/Command/GenerateCommand.swift index d7f80b4..8239bc2 100644 --- a/Binary/Sources/Deli/Command/GenerateCommand.swift +++ b/Binary/Sources/Deli/Command/GenerateCommand.swift @@ -5,20 +5,39 @@ import Foundation import Commandant -import Result struct GenerateCommand: CommandProtocol { let verb = "generate" let function = "Generate the Dependency Graph." + func saveOutput(generator: Generator, outputFile: String) throws { + let outputData = try generator.generate() + let url = URL(fileURLWithPath: outputFile) + + var isDirectory: ObjCBool = false + if FileManager.default.fileExists(atPath: outputFile, isDirectory: &isDirectory), isDirectory.boolValue { + Logger.log(.error("Cannot overwrite a directory with an output file: \(outputFile)", nil)) + throw CommandError.cannotOverwriteDirectory + } + try? FileManager.default.removeItem(at: url) + try outputData.write(to: url, atomically: false, encoding: .utf8) + } + func run(_ options: GenerateOptions) -> Result<(), CommandError> { - Logger.isVerbose = options.isVerbose + Logger.isVerbose = options.isDebug || options.isVerbose + Logger.isDebug = options.isDebug let configuration = Configuration() let configure: Config let properties = CommandLine.get(forKey: "property") if let project = options.project { - guard let config = configuration.getConfig(project: project, scheme: options.scheme, target: options.target, output: nil, properties: properties) else { + guard let config = configuration.getConfig( + project: project, + scheme: options.scheme, + target: options.target, + output: nil, + properties: properties + ) else { return .failure(.failedToLoadConfigFile) } configure = config @@ -55,6 +74,7 @@ struct GenerateCommand: CommandProtocol { } let propertyParser = PropertyParser() + let resolveParser = ResolveParser() let parser = Parser([ ComponentParser(), ConfigurationParser(), @@ -64,6 +84,8 @@ struct GenerateCommand: CommandProtocol { LazyAutowiredFactoryParser(), InjectParser(), InjectPropertyParser(), + DependencyParser(), + PropertyValueParser(), ConfigPropertyParser() ]) let corrector = Corrector([ @@ -83,37 +105,46 @@ struct GenerateCommand: CommandProtocol { propertyParser.load(propertyFiles) do { + try resolveParser.load(info.dependencies) + let results = try validator.run( try corrector.run( - try parser.run(sourceFiles) + try resolveParser.run( + try parser.run(sourceFiles) + ) ) ) - let outputData: String - switch options.type { - case "graph", "html": - outputData = try GraphGenerator(results: results, properties: propertyParser.properties).generate() - case "code", "swift": - outputData = try SourceGenerator(className: className, results: results, properties: propertyParser.properties).generate() - case "raw": - outputData = try RawGenerator(results: results, properties: propertyParser.properties).generate() - default: - throw CommandError.unacceptableType - } - - if let path = options.output { - let url = URL(fileURLWithPath: path) - - var isDirectory: ObjCBool = false - if FileManager.default.fileExists(atPath: path, isDirectory: &isDirectory), isDirectory.boolValue { - Logger.log(.error("Cannot overwrite a directory with an output file: \(path)", nil)) - throw CommandError.cannotOverwriteDirectory + let generator: Generator = try { + switch options.type { + case "graph", "html": + return GraphGenerator( + results: results, + properties: propertyParser.properties + ) + case "code", "swift": + return SourceGenerator( + className: className, + accessControl: info.accessControl, + results: results, + properties: propertyParser.properties + ) + case "raw", "text": + return RawGenerator( + results: results, + properties: propertyParser.properties + ) + default: + throw CommandError.unacceptableType } - try outputData.write(to: url, atomically: false, encoding: .utf8) + }() + if let path = options.output { + try saveOutput(generator: generator, outputFile: path) Logger.log(.info("Generate file: \(path)")) } else { - print(outputData) + print() + print(try generator.generate()) } } catch let error { return .failure(.runner(error)) @@ -126,6 +157,7 @@ struct GenerateCommand: CommandProtocol { struct GenerateOptions: OptionsProtocol { let configFile: String? let isVerbose: Bool + let isDebug: Bool let project: String? let scheme: String? let target: String? @@ -133,10 +165,20 @@ struct GenerateOptions: OptionsProtocol { let properties: String? let type: String - static func create(configFile: String?) -> (_ isVerbose: Bool) -> (_ project: String?) -> (_ scheme: String?) -> (_ target: String?) -> (_ output: String?) -> (_ properties: String?) -> (_ type: String) -> GenerateOptions { - return { isVerbose in { project in { scheme in { target in { output in { properties in { type in - self.init(configFile: configFile, isVerbose: isVerbose, project: project, scheme: scheme, target: target, output: output, properties: properties, type: type) - }}}}}}} + static func create(configFile: String?) -> (_ isVerbose: Bool) -> (_ isDebug: Bool) -> (_ project: String?) -> (_ scheme: String?) -> (_ target: String?) -> (_ output: String?) -> (_ properties: String?) -> (_ type: String) -> GenerateOptions { + return { isVerbose in { isDebug in { project in { scheme in { target in { output in { properties in { type in + self.init( + configFile: configFile, + isVerbose: isVerbose, + isDebug: isDebug, + project: project, + scheme: scheme, + target: target, + output: output, + properties: properties, + type: type + ) + }}}}}}}} } static func evaluate(_ mode: CommandMode) -> Result> { @@ -151,6 +193,11 @@ struct GenerateOptions: OptionsProtocol { defaultValue: false, usage: "turn on verbose logging" ) + <*> mode <| Option( + key: "debug", + defaultValue: false, + usage: "turn on debug logging" + ) <*> mode <| Option( key: "project", defaultValue: nil, diff --git a/Binary/Sources/Deli/Command/UpgradeCommand.swift b/Binary/Sources/Deli/Command/UpgradeCommand.swift index 1d86c33..3f27310 100644 --- a/Binary/Sources/Deli/Command/UpgradeCommand.swift +++ b/Binary/Sources/Deli/Command/UpgradeCommand.swift @@ -5,14 +5,14 @@ import Foundation import Commandant -import Result struct UpgradeCommand: CommandProtocol { let verb = "upgrade" let function = "Upgrade outdated." func run(_ options: UpgradeOptions) -> Result<(), CommandError> { - Logger.isVerbose = options.isVerbose + Logger.isVerbose = options.isDebug || options.isVerbose + Logger.isDebug = options.isDebug guard let latestVersion = VersionManager.shared.getLatestVersion() else { return .failure(.notFoundLatestVersion) @@ -52,17 +52,20 @@ struct UpgradeCommand: CommandProtocol { struct UpgradeOptions: OptionsProtocol { let isVerbose: Bool + let isDebug: Bool - static func create(isVerbose: Bool) -> UpgradeOptions { - return self.init(isVerbose: isVerbose) + static func create(isVerbose: Bool) -> (_ isDebug: Bool) -> UpgradeOptions { + return { isDebug in + self.init( + isVerbose: isVerbose, + isDebug: isDebug + ) + } } static func evaluate(_ mode: CommandMode) -> Result> { return create - <*> mode <| Option( - key: "verbose", - defaultValue: false, - usage: "turn on verbose logging" - ) + <*> mode <| Option(key: "verbose", defaultValue: false, usage: "turn on verbose logging") + <*> mode <| Option(key: "debug", defaultValue: false, usage: "turn on debug logging") } } diff --git a/Binary/Sources/Deli/Command/ValidateCommand.swift b/Binary/Sources/Deli/Command/ValidateCommand.swift index d3402b5..6dbf2a5 100644 --- a/Binary/Sources/Deli/Command/ValidateCommand.swift +++ b/Binary/Sources/Deli/Command/ValidateCommand.swift @@ -4,20 +4,26 @@ // import Commandant -import Result struct ValidateCommand: CommandProtocol { let verb = "validate" let function = "Validate the Dependency Graph." func run(_ options: ValidateOptions) -> Result<(), CommandError> { - Logger.isVerbose = options.isVerbose + Logger.isVerbose = options.isDebug || options.isVerbose + Logger.isDebug = options.isDebug let configuration = Configuration() let configure: Config let properties = CommandLine.get(forKey: "property") if let project = options.project { - guard let config = configuration.getConfig(project: project, scheme: options.scheme, target: options.target, output: nil, properties: properties) else { + guard let config = configuration.getConfig( + project: project, + scheme: options.scheme, + target: options.target, + output: nil, + properties: properties + ) else { return .failure(.failedToLoadConfigFile) } configure = config @@ -52,6 +58,7 @@ struct ValidateCommand: CommandProtocol { } let propertyParser = PropertyParser() + let resolveParser = ResolveParser() let parser = Parser([ ComponentParser(), ConfigurationParser(), @@ -61,6 +68,8 @@ struct ValidateCommand: CommandProtocol { LazyAutowiredFactoryParser(), InjectParser(), InjectPropertyParser(), + DependencyParser(), + PropertyValueParser(), ConfigPropertyParser() ]) let corrector = Corrector([ @@ -80,9 +89,13 @@ struct ValidateCommand: CommandProtocol { propertyParser.load(propertyFiles) do { + try resolveParser.load(info.dependencies) + _ = try validator.run( try corrector.run( - try parser.run(sourceFiles) + try resolveParser.run( + try parser.run(sourceFiles) + ) ) ) @@ -102,11 +115,20 @@ struct ValidateOptions: OptionsProtocol { let target: String? let properties: String? let isVerbose: Bool + let isDebug: Bool - static func create(configFile: String?) -> (_ project: String?) -> (_ scheme: String?) -> (_ target: String?) -> (_ properties: String?) -> (_ isVerbose: Bool) -> ValidateOptions { - return { project in { scheme in { target in { properties in { isVerbose in - self.init(configFile: configFile, project: project, scheme: scheme, target: target, properties: properties, isVerbose: isVerbose) - }}}}} + static func create(configFile: String?) -> (_ project: String?) -> (_ scheme: String?) -> (_ target: String?) -> (_ properties: String?) -> (_ isVerbose: Bool) -> (_ isDebug: Bool) -> ValidateOptions { + return { project in { scheme in { target in { properties in { isVerbose in { isDebug in + self.init( + configFile: configFile, + project: project, + scheme: scheme, + target: target, + properties: properties, + isVerbose: isVerbose, + isDebug: isDebug + ) + }}}}}} } static func evaluate(_ mode: CommandMode) -> Result> { @@ -141,5 +163,10 @@ struct ValidateOptions: OptionsProtocol { defaultValue: false, usage: "turn on verbose logging" ) + <*> mode <| Option( + key: "debug", + defaultValue: false, + usage: "turn on debug logging" + ) } } diff --git a/Binary/Sources/Deli/Command/VersionCommand.swift b/Binary/Sources/Deli/Command/VersionCommand.swift index 1d5ec7a..e871a5c 100644 --- a/Binary/Sources/Deli/Command/VersionCommand.swift +++ b/Binary/Sources/Deli/Command/VersionCommand.swift @@ -4,7 +4,6 @@ // import Commandant -import Result struct VersionCommand: CommandProtocol { let verb = "version" diff --git a/Binary/Sources/Deli/Configuration.swift b/Binary/Sources/Deli/Configuration.swift index b797f74..1ee0085 100644 --- a/Binary/Sources/Deli/Configuration.swift +++ b/Binary/Sources/Deli/Configuration.swift @@ -4,7 +4,7 @@ // import Foundation -import xcodeproj +import XcodeProj import Yams enum ConfigurationError: Error { @@ -36,7 +36,7 @@ final class Configuration { private lazy var basePath = self.fileManager.currentDirectoryPath private func findPath(_ fileName: String) -> String? { - guard let baseURL = URL(string: basePath) else { return nil } + let baseURL = URL(fileURLWithPath: basePath) let fileURL = baseURL.appendingPathComponent(fileName).standardized guard fileManager.fileExists(atPath: fileURL.path) else { return nil } @@ -152,23 +152,37 @@ final class Configuration { for element in group.children { guard let group = element as? PBXGroup else { if let path = element.path { - stackedPath.append(path) - filePath[element.uuid] = stackedPath.joined(separator: "/") - _ = stackedPath.popLast() + switch element.sourceTree { + case .sourceRoot, .sdkRoot, .buildProductsDir: + filePath[element.uuid] = path + + default: + stackedPath.append(path) + filePath[element.uuid] = stackedPath.joined(separator: "/") + _ = stackedPath.popLast() + } } continue } - + if let path = group.path { - stackedPath.append(path) + switch element.sourceTree { + case .sourceRoot: + stackedPath = [path] + + default: + stackedPath.append(path) + } } for (key, value) in parseFileTree(group: group, project: project, stackedPath: stackedPath) { filePath[key] = value } - + if group.path != nil { - _ = stackedPath.popLast() + if element.sourceTree != .sourceRoot { + _ = stackedPath.popLast() + } } } @@ -181,15 +195,9 @@ final class Configuration { guard let path = configPath ?? findPath(Constant.configFile) else { /// Not exist configuration file. /// Find to project file in current directory. - #if swift(>=4.1) let projectList = (try? fileManager.contentsOfDirectory(atPath: basePath))? - .compactMap { URL(string: $0) } + .map { URL(fileURLWithPath: $0) } .filter { $0.pathExtension == Constant.xcodeProjectExtension } ?? [] - #else - let projectList = (try? fileManager.contentsOfDirectory(atPath: basePath))? - .flatMap { URL(string: $0) } - .filter { $0.pathExtension == Constant.xcodeProjectExtension } ?? [] - #endif guard let projectURL = projectList.first else { Logger.log(.error("Not found project file.", nil)) @@ -239,17 +247,25 @@ final class Configuration { } } func getConfig(project: String, scheme: String?, target: String?, output: String?, properties: [String]) -> Config? { + let info = ConfigInfo( + project: project, + scheme: scheme, + target: target, + output: output, + properties: properties, + dependencies: [] + ) return Config( - target: [project], - config: [project: ConfigInfo(project: project, scheme: scheme, target: target, output: output, properties: properties)] + target: [info.project], + config: [info.project: info] ) } func getOutputPath(info: ConfigInfo, fileName: String? = nil) -> String { let projectFile = convertToProjectFile(info.project) guard let projectPath = findPath(projectFile) else { return "" } - guard let projectURL = URL(string: projectPath) else { return "" } + let projectURL = URL(fileURLWithPath: projectPath) let projectDirectory = projectURL.deletingLastPathComponent() let url = projectDirectory.appendingPathComponent(info.output ?? fileName ?? Constant.outputFile).standardized @@ -260,6 +276,21 @@ final class Configuration { return url.path } } + func getResolvedOutputPath(info: ConfigInfo) -> String { + let projectFile = convertToProjectFile(info.project) + guard let projectPath = findPath(projectFile) else { return "" } + + let projectURL = URL(fileURLWithPath: projectPath) + let projectDirectory = projectURL.deletingLastPathComponent() + let url = projectDirectory.appendingPathComponent(info.resolve?.output ?? ResolveParser.Constant.resolveFile).standardized + + var isDirectory: ObjCBool = false + if fileManager.fileExists(atPath: url.path, isDirectory: &isDirectory), isDirectory.boolValue { + return url.appendingPathComponent(ResolveParser.Constant.resolveFile).standardized.path + } else { + return url.path + } + } func getClassName(info: ConfigInfo) -> String { let path = getOutputPath(info: info) @@ -267,7 +298,8 @@ final class Configuration { if let name = info.className { return name } - guard let url = URL(string: path) else { return Constant.className } + + let url = URL(fileURLWithPath: path) guard let match = "(.+)\\.swift$".r?.findFirst(in: url.lastPathComponent) else { return Constant.className } return match.group(at: 1) ?? Constant.className }() @@ -275,20 +307,13 @@ final class Configuration { let nameReplaceRegex = "(^[^a-zA-Z_]+|[^a-zA-Z0-9_]+)".r! let newClassName = nameReplaceRegex.replaceAll(in: className, with: "_") - let first: String - let other: String - #if swift(>=4.0) - first = newClassName.prefix(1).uppercased() - other = String(newClassName.dropFirst()) - #else - first = String(newClassName.characters.prefix(1)).capitalized - other = String(newClassName.characters.dropFirst()) - #endif + let first = newClassName.prefix(1).uppercased() + let other = String(newClassName.dropFirst()) return first + other } func getPropertyList(info: ConfigInfo, properties: [String]) -> [String] { - guard let baseURL = URL(string: basePath) else { return [] } + let baseURL = URL(fileURLWithPath: basePath) /// Find properties recursive var propertyList: [String] = [] @@ -300,6 +325,8 @@ final class Configuration { guard !target.isEmpty else { if self.fileManager.fileExists(atPath: urlPath) { propertyList.append(urlPath) + } else { + Logger.log(.warn("Not found the property file: \(urlPath)", nil)) } return } @@ -342,14 +369,10 @@ final class Configuration { } /// Load project file. - guard let projectURL = URL(string: projectPath) else { - Logger.log(.error("Cannnot open the project file: \(projectFile)", nil)) - throw ConfigurationError.projectCannotOpen - } - + let projectURL = URL(fileURLWithPath: projectPath) let projectDirectory = projectURL.deletingLastPathComponent() - guard let project = try? XcodeProj(pathString: projectURL.absoluteString) else { - Logger.log(.error("Cannnot open the project file: \(projectURL.lastPathComponent)", nil)) + guard let project = try? XcodeProj(pathString: projectURL.path) else { + Logger.log(.error("Cannot open the project file: \(projectURL.lastPathComponent)", nil)) throw ConfigurationError.projectCannotOpen } @@ -387,8 +410,7 @@ final class Configuration { guard let nativeTarget = target else { return [] } /// Find root group - guard let group = try? project.pbxproj.rootGroup() else { return [] } - guard let rootGroup = group else { return [] } + guard let rootGroup = try? project.pbxproj.rootGroup() else { return [] } let fileDictionary = parseFileTree(group: rootGroup, project: project) let outputPath = getOutputPath(info: info) @@ -407,14 +429,8 @@ final class Configuration { .replacingOccurrences(of: "//", with: "/") } - let sourceList: [String] - #if swift(>=4.1) - sourceList = fileList + let sourceList = fileList .compactMap { fileDictionary[$0.file?.uuid ?? ""] } - #else - sourceList = fileList - .flatMap { fileDictionary[$0.file?.uuid ?? ""] } - #endif let result = (sourceList + includeFiles) .map { diff --git a/Binary/Sources/Deli/Error/ParserError.swift b/Binary/Sources/Deli/Error/ParserError.swift index 424b304..ce29ae8 100644 --- a/Binary/Sources/Deli/Error/ParserError.swift +++ b/Binary/Sources/Deli/Error/ParserError.swift @@ -20,6 +20,7 @@ enum ParserError: Error { case payloadNotFound case configurationCannotSupportArrayType case targetPropertyNotFound + case useDependencyArray case unknownName case unknown @@ -57,6 +58,8 @@ enum ParserError: Error { return "Configuration does not support injection for Array type Dependency." case .targetPropertyNotFound: return "Configuration property does not found." + case .useDependencyArray: + return "Use @DependencyArray." case .unknownName: return "Unknown structure name." case .unknown: diff --git a/Binary/Sources/Deli/Extension/CodableSupport.swift b/Binary/Sources/Deli/Extension/CodableSupport.swift new file mode 100644 index 0000000..9866ea5 --- /dev/null +++ b/Binary/Sources/Deli/Extension/CodableSupport.swift @@ -0,0 +1,196 @@ +// +// CodableSupport.swift +// Deli +// +// Inspired by https://gist.github.com/mikebuss/17142624da4baf9cdcc337861e256533 +// + +import Foundation + +private struct JSONCodingKeys: CodingKey { + var stringValue: String + var intValue: Int? + + init?(stringValue: String) { + self.stringValue = stringValue + } + init?(intValue: Int) { + self.init(stringValue: "\(intValue)") + self.intValue = intValue + } +} + +extension KeyedDecodingContainer { + func decode(_ type: [String: Any].Type, forKey key: K) throws -> [String: Any] { + let container = try nestedContainer(keyedBy: JSONCodingKeys.self, forKey: key) + return try container.decode(type) + } + + func decode(_ type: [Any].Type, forKey key: K) throws -> [Any] { + var container = try nestedUnkeyedContainer(forKey: key) + return try container.decode(type) + } + + func decode(_ type: [String: Any].Type) throws -> [String: Any] { + var dictionary = [String: Any]() + + for key in allKeys { + if let boolValue = try? decode(Bool.self, forKey: key) { + dictionary[key.stringValue] = boolValue + } else if let stringValue = try? decode(String.self, forKey: key) { + dictionary[key.stringValue] = stringValue + } else if let intValue = try? decode(Int.self, forKey: key) { + dictionary[key.stringValue] = intValue + } else if let doubleValue = try? decode(Double.self, forKey: key) { + dictionary[key.stringValue] = doubleValue + } else if let nestedDictionary = try? decode([String: Any].self, forKey: key) { + dictionary[key.stringValue] = nestedDictionary + } else if let nestedArray = try? decode([Any].self, forKey: key) { + dictionary[key.stringValue] = nestedArray + } + } + return dictionary + } + + func decodeIfPresent(_ type: [String: Any].Type, forKey key: K) throws -> [String: Any]? { + guard contains(key) else { return nil } + return try decode(type, forKey: key) + } + + func decodeIfPresent(_ type: [Any].Type, forKey key: K) throws -> [Any]? { + guard contains(key) else { return nil } + return try decode(type, forKey: key) + } +} + +extension UnkeyedDecodingContainer { + mutating func decode(_ type: [Any].Type) throws -> [Any] { + var array: [Any] = [] + while !isAtEnd { + if let value = try? decode(Bool.self) { + array.append(value) + } else if let value = try? decode(Int.self) { + array.append(value) + } else if let value = try? decode(Double.self) { + array.append(value) + } else if let value = try? decode(String.self) { + array.append(value) + } else if let nestedDictionary = try? decode([String: Any].self) { + array.append(nestedDictionary) + } else if let nestedArray = try? decode([Any].self) { + array.append(nestedArray) + } + } + return array + } + + mutating func decode(_ type: [String: Any].Type) throws -> [String: Any] { + let container = try nestedContainer(keyedBy: JSONCodingKeys.self) + return try container.decode(type) + } +} + +extension KeyedEncodingContainerProtocol where Key == JSONCodingKeys { + mutating func encodeJSONDictionary(_ value: [String: Any]) throws { + try value.forEach { (key, value) in + guard let key = JSONCodingKeys(stringValue: key) else { return } + switch value { + case let value as Bool: + try encode(value, forKey: key) + case let value as Int: + try encode(value, forKey: key) + case let value as String: + try encode(value, forKey: key) + case let value as Double: + try encode(value, forKey: key) + case let value as [String: Any]: + try encode(value, forKey: key) + case let value as [Any]: + try encode(value, forKey: key) + case is NSNull: + try encodeNil(forKey: key) + case Optional.none: + try encodeNil(forKey: key) + default: + throw EncodingError.invalidValue(value, EncodingError.Context(codingPath: codingPath + [key], debugDescription: "Invalid JSON value")) + } + } + } +} + +extension KeyedEncodingContainerProtocol { + mutating func encode(_ value: [String: Any], forKey key: Key) throws { + var container = nestedContainer(keyedBy: JSONCodingKeys.self, forKey: key) + try container.encodeJSONDictionary(value) + } + + mutating func encode(_ value: [String: Any]?, forKey key: Key) throws { + guard let value = value else { return } + var container = nestedContainer(keyedBy: JSONCodingKeys.self, forKey: key) + try container.encodeJSONDictionary(value) + } + + mutating func encodeIfPresent(_ value: [String: Any]?, forKey key: Key) throws { + guard let value = value else { return } + try encode(value, forKey: key) + } + + mutating func encode(_ value: [Any], forKey key: Key) throws { + var container = nestedUnkeyedContainer(forKey: key) + try container.encodeJSONArray(value) + } + + mutating func encode(_ value: [Any]?, forKey key: Key) throws { + guard let value = value else { return } + var container = nestedUnkeyedContainer(forKey: key) + try container.encodeJSONArray(value) + } + + mutating func encodeIfPresent(_ value: [Any]?, forKey key: Key) throws { + guard let value = value else { return } + try encode(value, forKey: key) + } +} + +extension UnkeyedEncodingContainer { + mutating func encode(_ value: [String: Any]) throws { + var container = nestedContainer(keyedBy: JSONCodingKeys.self) + try container.encodeJSONDictionary(value) + } + + mutating func encode(_ value: [Any]) throws { + var container = nestedUnkeyedContainer() + try container.encodeJSONArray(value) + } + + mutating func encodeJSONArray(_ value: [Any]) throws { + try value.enumerated().forEach { (index, value) in + switch value { + case let value as Bool: + try encode(value) + case let value as Int: + try encode(value) + case let value as String: + try encode(value) + case let value as Double: + try encode(value) + case let value as [String: Any]: + try encode(value) + case let value as [Any]: + try encode(value) + case is NSNull: + try encodeNil() + case Optional.none: + try encodeNil() + default: + let keys = JSONCodingKeys(intValue: index).map { [$0] } ?? [] + throw EncodingError.invalidValue(value, EncodingError.Context(codingPath: codingPath + keys, debugDescription: "Invalid JSON value")) + } + } + } + + mutating func encodeJSONDictionary(_ value: [String: Any]) throws { + var container = nestedContainer(keyedBy: JSONCodingKeys.self) + try container.encodeJSONDictionary(value) + } +} diff --git a/Binary/Sources/Deli/Logger.swift b/Binary/Sources/Deli/Logger.swift index acb6561..8c79eb9 100644 --- a/Binary/Sources/Deli/Logger.swift +++ b/Binary/Sources/Deli/Logger.swift @@ -83,6 +83,7 @@ final class Logger { // MARK: - Public static var isVerbose: Bool = false + static var isDebug: Bool = false static func log( _ logging: LoggingType, @@ -104,7 +105,11 @@ final class Logger { switch logging { case .fatal: let color = color ?? .red - print(color.resolve("\(output) [\(file):\(line) (\(function))]")) + if isDebug { + print(color.resolve("\(output) [\(file):\(line) (\(function))]")) + } else { + print(color.resolve(output)) + } fatalError() case .error: @@ -122,12 +127,20 @@ final class Logger { case .debug: guard isVerbose else { return } let color = color ?? .cyan - print(color.resolve("\(output) [\(file):\(line) (\(function))]")) + if isDebug { + print(color.resolve("\(output) [\(file):\(line) (\(function))]")) + } else { + print(color.resolve(output)) + } case .assert: guard isVerbose else { return } let color = color ?? .cyan - print(color.resolve("\(output) [\(file):\(line) (\(function))]")) + if isDebug { + print(color.resolve("\(output) [\(file):\(line) (\(function))]")) + } else { + print(color.resolve(output)) + } assertionFailure() case .newLine: diff --git a/Binary/Sources/Deli/Model/Config.swift b/Binary/Sources/Deli/Model/Config.swift index 0fb888d..f06d677 100644 --- a/Binary/Sources/Deli/Model/Config.swift +++ b/Binary/Sources/Deli/Model/Config.swift @@ -3,7 +3,6 @@ // Deli // -import Foundation import Yams struct Config: Decodable { @@ -26,11 +25,4 @@ struct Config: Decodable { self.target = target self.config = config } - - init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - target = try container.decode(Set.self, forKey: .target) - config = (try? container.decode([String: ConfigInfo].self, forKey: .config)) ?? [:] - } } diff --git a/Binary/Sources/Deli/Model/ConfigDependencyInfo.swift b/Binary/Sources/Deli/Model/ConfigDependencyInfo.swift new file mode 100644 index 0000000..d130bcf --- /dev/null +++ b/Binary/Sources/Deli/Model/ConfigDependencyInfo.swift @@ -0,0 +1,40 @@ +// +// ConfigDependencyInfo.swift +// Deli +// + +import Foundation + +struct ConfigDependencyInfo: Decodable { + + // MARK: - Enumerable + + enum CodingKeys: String, CodingKey { + case path + case `imports` = "import" + } + + // MARK: - Property + + let path: String + let imports: [String] + + // MARK: - Lifecycle + + init(path: String, imports: [String]) { + self.path = path + self.imports = imports + } + + init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + path = try container.decode(String.self, forKey: .path) + if let importFramework = try container.decodeIfPresent(String.self, forKey: .imports) { + imports = [importFramework] + } else { + imports = try container.decodeIfPresent([String].self, forKey: .imports) ?? [] + } + } + +} diff --git a/Binary/Sources/Deli/Model/ConfigInfo.swift b/Binary/Sources/Deli/Model/ConfigInfo.swift index 59e01c1..f31e99f 100644 --- a/Binary/Sources/Deli/Model/ConfigInfo.swift +++ b/Binary/Sources/Deli/Model/ConfigInfo.swift @@ -4,7 +4,6 @@ // import Foundation -import Yams struct ConfigInfo: Decodable { @@ -17,8 +16,11 @@ struct ConfigInfo: Decodable { case include case exclude case output + case resolve case properties + case dependencies case className + case accessControl } // MARK: - Property @@ -29,32 +31,41 @@ struct ConfigInfo: Decodable { let include: [String] let exclude: [String] let output: String? + let resolve: ConfigResolveInfo? let properties: [String] + let dependencies: [ConfigDependencyInfo] let className: String? + let accessControl: String? // MARK: - Lifecycle - init(project: String, scheme: String? = nil, target: String? = nil, output: String? = nil, properties: [String] = [], className: String? = nil) { + init(project: String, scheme: String? = nil, target: String? = nil, output: String? = nil, resolve: ConfigResolveInfo? = nil, properties: [String] = [], dependencies: [ConfigDependencyInfo] = [], className: String? = nil, accessControl: String? = nil) { self.project = project self.scheme = scheme self.target = target self.include = [] self.exclude = [] self.output = output + self.resolve = resolve self.properties = properties + self.dependencies = dependencies self.className = className + self.accessControl = accessControl } init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) project = try container.decode(String.self, forKey: .project) - scheme = try? container.decode(String.self, forKey: .scheme) - target = try? container.decode(String.self, forKey: .target) - include = (try? container.decode([String].self, forKey: .include)) ?? [] - exclude = (try? container.decode([String].self, forKey: .exclude)) ?? [] - output = try? container.decode(String.self, forKey: .output) - properties = (try? container.decode([String].self, forKey: .properties)) ?? [] - className = try? container.decode(String.self, forKey: .className) + scheme = try container.decodeIfPresent(String.self, forKey: .scheme) + target = try container.decodeIfPresent(String.self, forKey: .target) + include = try container.decodeIfPresent([String].self, forKey: .include) ?? [] + exclude = try container.decodeIfPresent([String].self, forKey: .exclude) ?? [] + output = try container.decodeIfPresent(String.self, forKey: .output) + resolve = try container.decodeIfPresent(ConfigResolveInfo.self, forKey: .resolve) + properties = try container.decodeIfPresent([String].self, forKey: .properties) ?? [] + dependencies = try container.decodeIfPresent([ConfigDependencyInfo].self, forKey: .dependencies) ?? [] + className = try container.decodeIfPresent(String.self, forKey: .className) + accessControl = try container.decodeIfPresent(String.self, forKey: .accessControl) } } diff --git a/Binary/Sources/Deli/Model/ConfigResolveInfo.swift b/Binary/Sources/Deli/Model/ConfigResolveInfo.swift new file mode 100644 index 0000000..0fb8709 --- /dev/null +++ b/Binary/Sources/Deli/Model/ConfigResolveInfo.swift @@ -0,0 +1,36 @@ +// +// ConfigResolveInfo.swift +// deli +// +// Created by Kawoou on 11/02/2019. +// + +import Foundation + +struct ConfigResolveInfo: Decodable { + + // MARK: - Enumerable + + enum CodingKeys: String, CodingKey { + case output + case isGenerate = "generate" + } + + // MARK: - Property + + let output: String? + let isGenerate: Bool + + // MARK: - Lifecycle + + init(output: String? = nil, isGenerate: Bool = true) { + self.output = output + self.isGenerate = isGenerate + } + + init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + output = try container.decodeIfPresent(String.self, forKey: .output) + isGenerate = try container.decodeIfPresent(Bool.self, forKey: .isGenerate) ?? true + } +} diff --git a/Binary/Sources/Deli/Model/GithubRelease.swift b/Binary/Sources/Deli/Model/GithubRelease.swift index 150b28e..51ef01d 100644 --- a/Binary/Sources/Deli/Model/GithubRelease.swift +++ b/Binary/Sources/Deli/Model/GithubRelease.swift @@ -11,19 +11,9 @@ struct GithubRelease: Codable { struct Asset: Codable { - // MARK: - Property - - let id: Int - let name: String - let downloadURL: String - let contentType: String - let size: Int - let createdAt: Date - let updatedAt: Date - - // MARK: - Private + // MARK: - Enumerable - private enum CodingKeys: String, CodingKey { + enum CodingKeys: String, CodingKey { case id case name case downloadURL = "browser_download_url" @@ -33,43 +23,20 @@ struct GithubRelease: Codable { case updatedAt = "updated_at" } - // MARK: - Lifecycle + // MARK: - Property - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(id, forKey: .id) - try container.encode(name, forKey: .name) - try container.encode(downloadURL, forKey: .downloadURL) - try container.encode(contentType, forKey: .contentType) - try container.encode(size, forKey: .size) - try container.encode(createdAt, forKey: .createdAt) - try container.encode(updatedAt, forKey: .updatedAt) - } - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - id = try container.decode(Int.self, forKey: .id) - name = try container.decode(String.self, forKey: .name) - downloadURL = try container.decode(String.self, forKey: .downloadURL) - contentType = try container.decode(String.self, forKey: .contentType) - size = try container.decode(Int.self, forKey: .size) - createdAt = try container.decode(Date.self, forKey: .createdAt) - updatedAt = try container.decode(Date.self, forKey: .updatedAt) - } + let id: Int + let name: String + let downloadURL: String + let contentType: String + let size: Int + let createdAt: Date + let updatedAt: Date } - // MARK: - Property - - let id: Int - let name: String? - let tagName: String - - let assets: [Asset] - let createdAt: Date - let publishedAt: Date - - // MARK: - Private + // MARK: - Enumerable - private enum CodingKeys: String, CodingKey { + enum CodingKeys: String, CodingKey { case id case name case tagName = "tag_name" @@ -78,24 +45,13 @@ struct GithubRelease: Codable { case publishedAt = "published_at" } - // MARK: - Lifecycle + // MARK: - Property - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(id, forKey: .id) - try container.encode(name, forKey: .name) - try container.encode(tagName, forKey: .tagName) - try container.encode(assets, forKey: .assets) - try container.encode(createdAt, forKey: .createdAt) - try container.encode(publishedAt, forKey: .publishedAt) - } - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - id = try container.decode(Int.self, forKey: .id) - name = try? container.decode(String.self, forKey: .name) - tagName = try container.decode(String.self, forKey: .tagName) - assets = try container.decode([Asset].self, forKey: .assets) - createdAt = try container.decode(Date.self, forKey: .createdAt) - publishedAt = try container.decode(Date.self, forKey: .publishedAt) - } + let id: Int + let name: String? + let tagName: String + + let assets: [Asset] + let createdAt: Date + let publishedAt: Date } diff --git a/Binary/Sources/Deli/Model/ResolveData.swift b/Binary/Sources/Deli/Model/ResolveData.swift new file mode 100644 index 0000000..42545d1 --- /dev/null +++ b/Binary/Sources/Deli/Model/ResolveData.swift @@ -0,0 +1,85 @@ +// +// ResolveData.swift +// Deli +// + +import Foundation + +struct ResolveData: Codable { + + // MARK: - Enumerable + + enum CodingKeys: String, CodingKey { + case version = "VERSION" + case dependency = "DEPENDENCY" + case properties = "PROPERTY" + case projectName = "PROJECT" + case referenceName = "REFERENCE" + } + + // MARK: - Structure + + struct DependencyTarget: Codable { + enum CodingKeys: String, CodingKey { + case type = "TYPE" + case qualifier = "QUALIFIER" + case qualifierBy = "QUALIFIER_BY" + } + + let type: String + let qualifier: String + let qualifierBy: String? + } + + struct Dependency: Codable { + enum CodingKeys: String, CodingKey { + case type = "TYPE" + case qualifier = "QUALIFIER" + case isLazy = "LAZILY" + case isFactory = "FACTORY" + case isValueType = "VALUE_TYPE" + case dependencies = "DEPENDENCY" + case linkType = "LINK" + } + + let type: String + let qualifier: String? + let isLazy: Bool + let isFactory: Bool + let isValueType: Bool + var dependencies: [DependencyTarget] + var linkType: [String] + } + + // MARK: - Property + + let dependency: [Dependency] + let property: [String: Any] + let projectName: String + let referenceName: String + + // MARK: - Lifecycle + + init(dependency: [Dependency], property: [String: Any], projectName: String, referenceName: String) { + self.dependency = dependency + self.property = property + self.projectName = projectName + self.referenceName = referenceName + } + init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + //let version = try container.decode(String.self, forKey: .version) + dependency = try container.decode([Dependency].self, forKey: .dependency) + property = try container.decode([String: Any].self, forKey: .properties) + projectName = try container.decode(String.self, forKey: .projectName) + referenceName = try container.decode(String.self, forKey: .referenceName) + } + func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(Version.current.value, forKey: .version) + try container.encode(dependency, forKey: .dependency) + try container.encode(property, forKey: .properties) + try container.encode(projectName, forKey: .projectName) + try container.encode(referenceName, forKey: .referenceName) + } +} diff --git a/Binary/Sources/Deli/Model/Results.swift b/Binary/Sources/Deli/Model/Results.swift index c5c625f..4349e3e 100644 --- a/Binary/Sources/Deli/Model/Results.swift +++ b/Binary/Sources/Deli/Model/Results.swift @@ -8,6 +8,7 @@ protocol Results: class, CustomStringConvertible, CustomDebugStringConvertible { var isLazy: Bool { get } var isFactory: Bool { get } var isRegister: Bool { get } + var isResolved: Bool { get } var instanceType: String { get } var scope: String? { get set } var qualifier: String? { get set } @@ -20,6 +21,8 @@ protocol Results: class, CustomStringConvertible, CustomDebugStringConvertible { func makeSource() -> String? } extension Results { + var isResolved: Bool { return false } + func makeSource() -> String? { return nil } @@ -35,7 +38,7 @@ extension Results { ) """ } - .joined(separator: ",\n ") + .joined(separator: ",\n") .replacingOccurrences(of: "\n", with: "\n ") let instanceDependenciesString = instanceDependency @@ -49,7 +52,7 @@ extension Results { ) """ } - .joined(separator: ",\n ") + .joined(separator: ",\n") .replacingOccurrences(of: "\n", with: "\n ") let importsString = imports @@ -64,6 +67,7 @@ extension Results { isLazy: \(isLazy), isFactory: \(isFactory), isRegister: \(isRegister), + isResolved \(isResolved), scope: \(scope ?? ".singleton"), qualifier: \"\(qualifier ?? "")\", dependencies: [\(dependenciesString.isEmpty ? "" : ("\n " + dependenciesString + "\n "))], diff --git a/Binary/Sources/Deli/Model/RootStructure.swift b/Binary/Sources/Deli/Model/RootStructure.swift index 6e12c56..65864e6 100644 --- a/Binary/Sources/Deli/Model/RootStructure.swift +++ b/Binary/Sources/Deli/Model/RootStructure.swift @@ -25,13 +25,8 @@ final class RootStructure { self.filePath = filePath if let substructuresRaw = source[SwiftDocKey.substructure.rawValue] as? [KittenType] { - #if swift(>=4.1) self.substructures = substructuresRaw .compactMap { Structure(source: $0, filePath: filePath) } - #else - self.substructures = substructuresRaw - .flatMap { Structure(source: $0, filePath: filePath) } - #endif } else { self.substructures = [] } diff --git a/Binary/Sources/Deli/Model/Structure.swift b/Binary/Sources/Deli/Model/Structure.swift index 0bbea16..48e79f6 100644 --- a/Binary/Sources/Deli/Model/Structure.swift +++ b/Binary/Sources/Deli/Model/Structure.swift @@ -29,6 +29,8 @@ final class Structure { let typeName: String? let inheritedTypes: [String] let attributes: [String] + let attributeOffsets: [Int64] + let attributeLengths: [Int64] let substructures: [Structure] let offset: Int64 let length: Int64 @@ -57,39 +59,30 @@ final class Structure { /// Inheritances if let inheritedTypesRaw = source[SwiftDocKey.inheritedtypes.rawValue] as? [KittenType] { - #if swift(>=4.1) self.inheritedTypes = inheritedTypesRaw .compactMap { $0[SwiftDocKey.name.rawValue] as? String } - #else - self.inheritedTypes = inheritedTypesRaw - .flatMap { $0[SwiftDocKey.name.rawValue] as? String } - #endif } else { self.inheritedTypes = [] } /// Attributes if let attributesRaw = source["key.attributes"] as? [KittenType] { - #if swift(>=4.1) self.attributes = attributesRaw .compactMap { $0["key.attribute"] as? String } - #else - self.attributes = attributesRaw - .flatMap { $0["key.attribute"] as? String } - #endif + self.attributeOffsets = attributesRaw + .compactMap { $0["key.offset"] as? Int64 } + self.attributeLengths = attributesRaw + .compactMap { $0["key.length"] as? Int64 } } else { self.attributes = [] + self.attributeOffsets = [] + self.attributeLengths = [] } /// Sub-structures if let substructuresRaw = source[SwiftDocKey.substructure.rawValue] as? [KittenType] { - #if swift(>=4.1) self.substructures = substructuresRaw .compactMap { Structure(source: $0, filePath: filePath) } - #else - self.substructures = substructuresRaw - .flatMap { Structure(source: $0, filePath: filePath) } - #endif } else { self.substructures = [] } diff --git a/Binary/Sources/Deli/Runner/Corrector/ConfigPropertyCorrector.swift b/Binary/Sources/Deli/Runner/Corrector/ConfigPropertyCorrector.swift index 4d4025f..e1ed58a 100644 --- a/Binary/Sources/Deli/Runner/Corrector/ConfigPropertyCorrector.swift +++ b/Binary/Sources/Deli/Runner/Corrector/ConfigPropertyCorrector.swift @@ -16,21 +16,19 @@ final class ConfigPropertyCorrector: Correctable { func correct(by results: [Results]) throws -> [Results] { return try results.map { result -> Results in + guard !result.isResolved else { return result } guard let propertyResult = result as? ConfigPropertyResult else { return result } guard let info = parser.inheritanceList(result.instanceType).first else { return result } - propertyResult.propertyValues = try propertyResult.propertyKeys.map { - let path = "\(propertyResult.propertyTargetKey).\($0)" - guard let property = try propertyParser.getProperty(path) else { - Logger.log(.error("Not found configuration property: \(path)", info.structure.getSourceLine(with: info.content))) - throw CorrectorError.notFoundConfigurationProperty + try propertyResult.propertyInfos + .filter { !$0.isOptional } + .map { "\(propertyResult.propertyTargetKey).\($0.name)" } + .forEach { path in + if try propertyParser.getProperty(path) == nil { + Logger.log(.error("Not found configuration property: \(path)", info.structure.getSourceLine(with: info.content))) + throw CorrectorError.notFoundConfigurationProperty + } } - if property is NSNull { - return "" - } else { - return "\(property)" - } - } return result } diff --git a/Binary/Sources/Deli/Runner/Corrector/QualifierByCorrector.swift b/Binary/Sources/Deli/Runner/Corrector/QualifierByCorrector.swift index 51d6ee8..7d4a0a9 100644 --- a/Binary/Sources/Deli/Runner/Corrector/QualifierByCorrector.swift +++ b/Binary/Sources/Deli/Runner/Corrector/QualifierByCorrector.swift @@ -37,6 +37,7 @@ final class QualifierByCorrector: Correctable { func correct(by results: [Results]) throws -> [Results] { return try results.map { result -> Results in + guard !result.isResolved else { return result } guard let info = parser.inheritanceList(result.instanceType).first else { return result } result.dependencies = try result.dependencies diff --git a/Binary/Sources/Deli/Runner/Corrector/QualifierCorrector.swift b/Binary/Sources/Deli/Runner/Corrector/QualifierCorrector.swift index e37f2be..1489661 100644 --- a/Binary/Sources/Deli/Runner/Corrector/QualifierCorrector.swift +++ b/Binary/Sources/Deli/Runner/Corrector/QualifierCorrector.swift @@ -20,14 +20,14 @@ final class QualifierCorrector: Correctable { func correct(by results: [Results]) throws -> [Results] { results .filter { $0.qualifier == nil } - .forEach { info in - let typeList = parser.inheritanceList(info.instanceType) + .forEach { result in + guard !result.isResolved else { return } + + let typeList = parser.inheritanceList(result.instanceType) for type in typeList { guard !Constant.ignoreTypes.contains(type.name) else { continue } guard let qualifier = try? parseQualifier(type.structure, fileContent: type.content) else { continue } - guard let safeQualifier = qualifier else { continue } - - info.qualifier = safeQualifier + result.qualifier = qualifier break } } diff --git a/Binary/Sources/Deli/Runner/Corrector/ScopeCorrector.swift b/Binary/Sources/Deli/Runner/Corrector/ScopeCorrector.swift index 2a8e911..e8e0eef 100644 --- a/Binary/Sources/Deli/Runner/Corrector/ScopeCorrector.swift +++ b/Binary/Sources/Deli/Runner/Corrector/ScopeCorrector.swift @@ -20,14 +20,14 @@ final class ScopeCorrector: Correctable { func correct(by results: [Results]) throws -> [Results] { results .filter { $0.scope == nil } - .forEach { info in - let typeList = parser.inheritanceList(info.instanceType) + .forEach { result in + guard !result.isResolved else { return } + + let typeList = parser.inheritanceList(result.instanceType) for type in typeList { guard !Constant.ignoreTypes.contains(type.name) else { continue } guard let scope = try? parseScope(type.structure, fileContent: type.content) else { continue } - guard let safeScope = scope else { continue } - - info.scope = safeScope + result.scope = scope break } } diff --git a/Binary/Sources/Deli/Runner/Generator/GraphGenerator.swift b/Binary/Sources/Deli/Runner/Generator/GraphGenerator.swift index 0537ecf..8876bce 100644 --- a/Binary/Sources/Deli/Runner/Generator/GraphGenerator.swift +++ b/Binary/Sources/Deli/Runner/Generator/GraphGenerator.swift @@ -13,6 +13,7 @@ final class GraphGenerator: Generator { func generate() throws -> String { let output = results + .filter { !$0.isResolved } .flatMap { (result: Results) -> [GraphInfo] in let dependencies = result.dependencies .map { (result.instanceType, $0.name, "dependency") } diff --git a/Binary/Sources/Deli/Runner/Generator/RawGenerator.swift b/Binary/Sources/Deli/Runner/Generator/RawGenerator.swift index 227b9c7..7cfa63d 100644 --- a/Binary/Sources/Deli/Runner/Generator/RawGenerator.swift +++ b/Binary/Sources/Deli/Runner/Generator/RawGenerator.swift @@ -11,9 +11,8 @@ final class RawGenerator: Generator { func generate() throws -> String { return results - .map { (result: Results) -> String in - return result.description - } + .filter { !$0.isResolved } + .map { $0.description } .joined(separator: "\n\n") } diff --git a/Binary/Sources/Deli/Runner/Generator/ResolveGenerator.swift b/Binary/Sources/Deli/Runner/Generator/ResolveGenerator.swift new file mode 100644 index 0000000..d509486 --- /dev/null +++ b/Binary/Sources/Deli/Runner/Generator/ResolveGenerator.swift @@ -0,0 +1,79 @@ +// +// ResolveGenerator.swift +// Deli +// + +import Yams + +final class ResolveGenerator: Generator { + + // MARK: - Public + + func generate() throws -> String { + let encoder = YAMLEncoder() + return try encoder.encode(data) + } + + // MARK: - Private + + private let data: ResolveData + + // MARK: - Lifecycle + + convenience init(results: [Results], properties: [String : Any]) { + self.init( + projectName: "", + fileName: "DeliFactory.swift", + results: results, + properties: properties + ) + } + + init(projectName: String, fileName: String, results: [Results], properties: [String : Any]) { + var newDict = [String: ResolveData.Dependency]() + results + .filter { !$0.isResolved } + .forEach { result in + let dependency = ResolveData.Dependency(result: result) + + if var oldValue = newDict[dependency.type] { + oldValue.merging(dependency) + newDict[dependency.type] = oldValue + } else { + newDict[dependency.type] = dependency + } + } + + data = ResolveData( + dependency: Array(newDict.values).sorted { $0.type < $1.type }, + property: properties, + projectName: projectName, + referenceName: fileName + ) + } +} + +private extension ResolveData.DependencyTarget { + init(dependency: Dependency) { + type = dependency.name + qualifier = dependency.qualifier + qualifierBy = dependency.qualifierBy + } +} +private extension ResolveData.Dependency { + init(result: Results) { + type = result.instanceType + qualifier = result.qualifier + isLazy = result.isLazy + isFactory = result.isFactory + isValueType = result.valueType + dependencies = result.dependencies + .map { ResolveData.DependencyTarget(dependency: $0) } + linkType = Array(result.linkType) + } + + mutating func merging(_ data: ResolveData.Dependency) { + dependencies.append(contentsOf: data.dependencies) + linkType.append(contentsOf: data.linkType) + } +} diff --git a/Binary/Sources/Deli/Runner/Generator/SourceGenerator.swift b/Binary/Sources/Deli/Runner/Generator/SourceGenerator.swift index 5bbe015..31a7039 100644 --- a/Binary/Sources/Deli/Runner/Generator/SourceGenerator.swift +++ b/Binary/Sources/Deli/Runner/Generator/SourceGenerator.swift @@ -7,8 +7,48 @@ import Foundation final class SourceGenerator: Generator { + // MARK: - Public + + func generate() throws -> String { + let imports = Set(results.flatMap { $0.imports } + ["Deli"]) + .sorted() + .map { "import \($0)\n" } + .joined() + + let sourceList = results + .filter { !$0.isResolved } + .compactMap { $0.makeSource() } + + let output = sourceList + .joined(separator: "\n") + .replacingOccurrences(of: "\n", with: "\n ") + + let dictionaryData = generateDictionary(properties, indentDepth: 2) + + return """ + // + // \(className).swift + // Auto generated code. + // + + \(imports) + \(accessControl)final class \(className): ModuleFactory { + \(accessControl)override func load(context: AppContext) { + loadProperty(\(dictionaryData)) + + \(output) + } + } + """ + } + // MARK: - Private + private let className: String + private let accessControl: String + private let results: [Results] + private let properties: [String: Any] + private func generateDictionary(_ target: Any, indentDepth: Int) -> String { let indent = (0.. 0 else { return "[:]" } - + result += "[\n" var index = 0 @@ -55,60 +95,21 @@ final class SourceGenerator: Generator { return result } - // MARK: - Public - - func generate() throws -> String { - let imports = Set(results.flatMap { $0.imports } + ["Deli"]) - .sorted() - .map { "import \($0)\n" } - .joined() - - let sourceList: [String] - #if swift(>=4.1) - sourceList = results.compactMap { $0.makeSource() } - #else - sourceList = results.flatMap { $0.makeSource() } - #endif - - let output = sourceList - .joined(separator: "\n") - .replacingOccurrences(of: "\n", with: "\n ") - - let dictionaryData = generateDictionary(properties, indentDepth: 2) - - return """ - // - // \(className).swift - // Auto generated code. - // - - \(imports) - final class \(className): ModuleFactory { - override func load(context: AppContext) { - loadProperty(\(dictionaryData)) - - \(output) - } - } - """ - } - - // MARK: - Private - - private let className: String - private let results: [Results] - private let properties: [String: Any] - // MARK: - Lifecycle - init(results: [Results], properties: [String: Any]) { - self.className = "DeliFactory" - self.results = results.sorted { $0.instanceType < $1.instanceType } - self.properties = properties + convenience init(results: [Results], properties: [String: Any]) { + self.init( + className: "DeliFactory", + accessControl: nil, + results: results, + properties: properties + ) } - init(className: String, results: [Results], properties: [String: Any]) { + init(className: String, accessControl: String?, results: [Results], properties: [String: Any]) { self.className = className - self.results = results.sorted { $0.instanceType < $1.instanceType } + self.accessControl = accessControl.map { "\($0) " } ?? "" + self.results = results + .sorted { $0.instanceType < $1.instanceType } self.properties = properties } } diff --git a/Binary/Sources/Deli/Runner/Parser.swift b/Binary/Sources/Deli/Runner/Parser.swift index 41cb146..92b5825 100644 --- a/Binary/Sources/Deli/Runner/Parser.swift +++ b/Binary/Sources/Deli/Runner/Parser.swift @@ -4,6 +4,7 @@ // import Foundation +import Regex import SourceKittenFramework final class Parser: Runnable { @@ -21,6 +22,8 @@ final class Parser: Runnable { Structure.AccessLevel.public, Structure.AccessLevel.internal ] + + static let typealiasRegex = "typealias[\\s]+([^\\s=]+)[\\s]*=[\\s]*([^\\n]+)".r! } // MARK: - Property @@ -30,16 +33,62 @@ final class Parser: Runnable { // MARK: - Private private var inheritanceMap = [String: InheritanceInfo]() + + private func parseTypealias(structure: Structure, content: String) -> String? { + guard let data = content.utf8[Int(structure.offset).. [Results] { - guard let name = structure.name else { return [] } + private func parse( + structure: Structure, + content: String, + typePrefix: String = "", + typealiasMap: [String: String] = [:] + ) throws -> [Results] { + guard let name = structure.name.map({ typePrefix + $0 }) else { return [] } /// Compare allowed keywords guard Constant.allowKinds.contains(structure.kind) else { return [] } /// Compares allowed AccessLevels guard Constant.allowAccessLevels.contains(structure.accessLevel) else { return [] } - + + /// Saved typealias + var typealiasMap = typealiasMap + structure.substructures + .filter { $0.kind == SwiftDeclarationKind.typealias.rawValue } + .forEach { structure in + guard let typeName = structure.name else { return } + guard let typeResult = parseTypealias(structure: structure, content: content) else { return } + + typealiasMap[typeName] = typeResult + typealiasMap["\(name).\(typeName)"] = typeResult + } + + /// Find nested type + let results = try structure.substructures + .flatMap { + try parse( + structure: $0, + content: content, + typePrefix: "\(name).", + typealiasMap: typealiasMap + ) + } + /// Save inheritance information inheritanceMap[name] = InheritanceInfo( name: name, @@ -49,25 +98,36 @@ final class Parser: Runnable { ) /// Parsing - return try moduleList + let parseResults = try moduleList .flatMap { parsable -> [Results] in let dependencies = try parsable.dependency - .flatMap { try $0.parse(by: structure, fileContent: content) } + .flatMap { + try $0.parse( + by: structure, + fileContent: content, + typePrefix: typePrefix, + typealiasMap: typealiasMap + ) + } return try parsable - .parse(by: structure, fileContent: content) + .parse( + by: structure, + fileContent: content, + typePrefix: typePrefix, + typealiasMap: typealiasMap + ) .map { result in result.dependencies.append(contentsOf: dependencies) return result } - } + } + results + + return parseResults } private func parse(path: String) throws -> [Results] { - guard let url = URL(string: path)?.standardized else { - Logger.log(.warn("Failed to create URL: \(path)", nil)) - return [] - } + let url = URL(fileURLWithPath: path).standardized let content = try String(contentsOfFile: path, encoding: .utf8) diff --git a/Binary/Sources/Deli/Runner/Parser/AutowiredFactoryParser.swift b/Binary/Sources/Deli/Runner/Parser/AutowiredFactoryParser.swift index 1fa8d99..a1dd478 100644 --- a/Binary/Sources/Deli/Runner/Parser/AutowiredFactoryParser.swift +++ b/Binary/Sources/Deli/Runner/Parser/AutowiredFactoryParser.swift @@ -58,8 +58,13 @@ final class AutowiredFactoryParser: Parsable { // MARK: - Public - func parse(by source: Structure, fileContent: String) throws -> [Results] { - guard let name = source.name else { + func parse( + by source: Structure, + fileContent: String, + typePrefix: String, + typealiasMap: [String: String] + ) throws -> [Results] { + guard let name = source.name.map({ typePrefix + $0 }) else { Logger.log(.assert("Unknown structure name.")) return [] } @@ -111,7 +116,7 @@ final class AutowiredFactoryParser: Parsable { return Dependency( parent: name, target: constructor, - name: arrayType, + name: typealiasMap[arrayType] ?? arrayType, type: .array, qualifier: qualifier, qualifierBy: qualifierBy @@ -120,7 +125,7 @@ final class AutowiredFactoryParser: Parsable { return Dependency( parent: name, target: constructor, - name: dependencyName, + name: typealiasMap[dependencyName] ?? dependencyName, qualifier: qualifier, qualifierBy: qualifierBy ) diff --git a/Binary/Sources/Deli/Runner/Parser/AutowiredParser.swift b/Binary/Sources/Deli/Runner/Parser/AutowiredParser.swift index e7c33a2..e4f087f 100644 --- a/Binary/Sources/Deli/Runner/Parser/AutowiredParser.swift +++ b/Binary/Sources/Deli/Runner/Parser/AutowiredParser.swift @@ -49,8 +49,13 @@ final class AutowiredParser: Parsable { // MARK: - Public - func parse(by source: Structure, fileContent: String) throws -> [Results] { - guard let name = source.name else { + func parse( + by source: Structure, + fileContent: String, + typePrefix: String, + typealiasMap: [String: String] + ) throws -> [Results] { + guard let name = source.name.map({ typePrefix + $0 }) else { Logger.log(.assert("Unknown structure name.")) return [] } @@ -100,7 +105,7 @@ final class AutowiredParser: Parsable { return Dependency( parent: name, target: constructor, - name: arrayType, + name: typealiasMap[arrayType] ?? arrayType, type: .array, qualifier: qualifier, qualifierBy: qualifierBy @@ -109,7 +114,7 @@ final class AutowiredParser: Parsable { return Dependency( parent: name, target: constructor, - name: dependencyName, + name: typealiasMap[dependencyName] ?? dependencyName, qualifier: qualifier, qualifierBy: qualifierBy ) diff --git a/Binary/Sources/Deli/Runner/Parser/ComponentParser.swift b/Binary/Sources/Deli/Runner/Parser/ComponentParser.swift index 3ce31ad..ca52428 100644 --- a/Binary/Sources/Deli/Runner/Parser/ComponentParser.swift +++ b/Binary/Sources/Deli/Runner/Parser/ComponentParser.swift @@ -15,8 +15,13 @@ final class ComponentParser: Parsable { // MARK: - Public - func parse(by source: Structure, fileContent: String) throws -> [Results] { - guard let name = source.name else { return [] } + func parse( + by source: Structure, + fileContent: String, + typePrefix: String, + typealiasMap: [String: String] + ) throws -> [Results] { + guard let name = source.name.map({ typePrefix + $0 }) else { return [] } guard source.inheritedTypes.contains(Constant.inheritanceName) else { return [] } let scope = try parseScope(source, fileContent: fileContent) diff --git a/Binary/Sources/Deli/Runner/Parser/ConfigPropertyParser.swift b/Binary/Sources/Deli/Runner/Parser/ConfigPropertyParser.swift index 909668b..f165238 100644 --- a/Binary/Sources/Deli/Runner/Parser/ConfigPropertyParser.swift +++ b/Binary/Sources/Deli/Runner/Parser/ConfigPropertyParser.swift @@ -19,7 +19,11 @@ final class ConfigPropertyParser: Parsable { // MARK: - Private - private func convert(_ source: Structure, fileContent: String) throws -> ConfigPropertyResult { + private func convert( + _ source: Structure, + fileContent: String, + typealiasMap: [String: String] + ) throws -> ConfigPropertyResult { guard let name = source.name else { throw ParserError.unknown } @@ -45,26 +49,54 @@ final class ConfigPropertyParser: Parsable { } let propertyList = properties - .compactMap { $0.name } - .filter { $0 != Constant.targetPropertyName } + .compactMap { structure -> ConfigPropertyResult.PropertyInfo? in + guard let type = structure.typeName else { return nil } + guard let name = structure.name else { return nil } + guard name != Constant.targetPropertyName else { return nil } + + if type.hasSuffix("?") || type.hasSuffix("!") { + return ConfigPropertyResult.PropertyInfo( + type: String(type[.. [Results] { + func parse( + by source: Structure, + fileContent: String, + typePrefix: String, + typealiasMap: [String: String] + ) throws -> [Results] { guard source.name != nil else { Logger.log(.assert("Unknown structure name.")) return [] } guard source.inheritedTypes.contains(Constant.inheritanceName) else { return [] } - return [try convert(source, fileContent: fileContent)] + return [ + try convert( + source, + fileContent: fileContent, + typealiasMap: typealiasMap + ) + ] } } diff --git a/Binary/Sources/Deli/Runner/Parser/ConfigurationParser.swift b/Binary/Sources/Deli/Runner/Parser/ConfigurationParser.swift index 4f54921..97c1e69 100644 --- a/Binary/Sources/Deli/Runner/Parser/ConfigurationParser.swift +++ b/Binary/Sources/Deli/Runner/Parser/ConfigurationParser.swift @@ -37,13 +37,19 @@ final class ConfigurationParser: Parsable { private let injectParser = InjectParser() - private func convert(_ source: Structure, parent: Structure, fileContent: String) throws -> ConfigFunctionResult { + private func convert( + _ source: Structure, + parent: Structure, + fileContent: String, + typePrefix: String, + typealiasMap: [String: String] + ) throws -> ConfigFunctionResult { guard let name = parent.name else { throw ParserError.unknown } /// Get previous context - guard let index = parent.substructures.index(where: { $0 === source }) else { + guard let index = parent.substructures.firstIndex(where: { $0 === source }) else { Logger.log(.assert("Not found the index of current structure on \(name).")) Logger.log(.error("Unknown error in `\(name)`.", source.getSourceLine(with: fileContent))) throw ParserError.unknown @@ -79,7 +85,7 @@ final class ConfigurationParser: Parsable { /// Read information let dependencies = try arguments /// Remove unnecessary arguments. - .filter { $0.index(of: Constant.argumentInfoKeyword) == nil } + .filter { $0.firstIndex(of: Constant.argumentInfoKeyword) == nil } .map { dependencyName -> Dependency in if Constant.arrayRegex.findFirst(in: dependencyName)?.group(at: 1) != nil { Logger.log(.error("Configuration does not support injection for Array type Dependency. Using `Inject(\(dependencyName).self)`.", source.getSourceLine(with: fileContent))) @@ -88,7 +94,7 @@ final class ConfigurationParser: Parsable { return Dependency( parent: name, target: source, - name: dependencyName + name: typealiasMap[dependencyName] ?? dependencyName ) } @@ -120,18 +126,17 @@ final class ConfigurationParser: Parsable { throw ParserError.unavailableDeclaration } - let imports: [String] - #if swift(>=4.1) - imports = Constant.importRegex + let imports = Constant.importRegex .findAll(in: fileContent) .compactMap { $0.group(at: 1) } - #else - imports = Constant.importRegex - .findAll(in: fileContent) - .flatMap { $0.group(at: 1) } - #endif - let injectResults = try injectParser.parse(by: source, fileContent: fileContent, isInheritanceCheck: false) + let injectResults = try injectParser.parse( + by: source, + fileContent: fileContent, + isInheritanceCheck: false, + typePrefix: typePrefix, + typealiasMap: typealiasMap + ) /// Result return ConfigFunctionResult( @@ -154,8 +159,13 @@ final class ConfigurationParser: Parsable { // MARK: - Public - func parse(by source: Structure, fileContent: String) throws -> [Results] { - guard let name = source.name else { + func parse( + by source: Structure, + fileContent: String, + typePrefix: String, + typealiasMap: [String: String] + ) throws -> [Results] { + guard let name = source.name.map({ typePrefix + $0 }) else { Logger.log(.assert("Unknown structure name.")) return [] } @@ -163,7 +173,15 @@ final class ConfigurationParser: Parsable { return try source.substructures .filter { validFunction($0) } - .map { try convert($0, parent: source, fileContent: fileContent) } + + .map { + try convert( + $0, + parent: source, + fileContent: fileContent, + typePrefix: typePrefix, + typealiasMap: typealiasMap + ) + } + [ ConfigurationResult( name, diff --git a/Binary/Sources/Deli/Runner/Parser/DependencyParser.swift b/Binary/Sources/Deli/Runner/Parser/DependencyParser.swift new file mode 100644 index 0000000..fda2163 --- /dev/null +++ b/Binary/Sources/Deli/Runner/Parser/DependencyParser.swift @@ -0,0 +1,127 @@ +// +// DependencyParser.swift +// deli +// +// Created by Kawoou on 2020/03/06. +// + +import SourceKittenFramework + +final class DependencyParser: Parsable { + + // MARK: - Constant + + private struct Constant { + static let propertyWrapperArray = "DependencyArray" + + static let propertyWrapperRegex = "@(DependencyArray|Dependency)(\\(([^\\(]*(\\([^\\)]*\\))*[^\\)]*)\\))?".r! + + static let qualifierName = "qualifier" + static let qualifierPrefix = "\(qualifierName):" + static let qualifierRegex = "\(qualifierName):[\\s]*\"([^\"]*)\"".r! + + static let qualifierByName = "qualifierBy" + static let qualifierByPrefix = "\(qualifierByName):" + static let qualifierByRegex = "\(qualifierByName):[\\s]*\"([^\"]*)\"".r! + + static let arrayRegex = "^\\[[\\s]*([^\\]]+)[\\s]*\\]$".r! + } + + // MARK: - Private + + private func found( + _ source: Structure, + root: Structure, + fileContent: String, + typealiasMap: [String: String] + ) throws -> Dependency? { + guard let rootName = root.name else { return nil } + guard let typeName = source.typeName else { return nil } + + guard let attributeOffset = source.attributeOffsets.first else { return nil } + guard let attributeLength = source.attributeLengths.first else { return nil } + guard let attributeName = fileContent.utf8[Int(attributeOffset).. String? in + guard let match = Constant.qualifierRegex.findFirst(in: result) else { return nil } + return match.group(at: 1) + }? + .trimmingCharacters(in: .whitespacesAndNewlines) ?? "" + + let qualifierBy = arguments + .first { $0.hasPrefix(Constant.qualifierByName) } + .flatMap { result -> String? in + guard let match = Constant.qualifierByRegex.findFirst(in: result) else { return nil } + return match.group(at: 1) + }? + .trimmingCharacters(in: .whitespacesAndNewlines) + + if let arrayMatch = Constant.arrayRegex.findFirst(in: typeName), let arrayType = arrayMatch.group(at: 1) { + if target == Constant.propertyWrapperArray { + return Dependency( + parent: rootName, + target: source, + name: typealiasMap[arrayType] ?? arrayType, + type: .array, + rule: .default, + qualifier: qualifier, + qualifierBy: qualifierBy + ) + } else { + Logger.log(.error("Use @DependencyArray for the Array type.", source.getSourceLine(with: fileContent))) + throw ParserError.useDependencyArray + } + } + return Dependency( + parent: rootName, + target: source, + name: typealiasMap[typeName] ?? typeName, + rule: .default, + qualifier: qualifier, + qualifierBy: qualifierBy + ) + } + + // MARK: - Public + + func parse( + by source: Structure, + fileContent: String, + typePrefix: String, + typealiasMap: [String: String] + ) throws -> [Results] { + guard let name = source.name.map({ typePrefix + $0 }) else { + Logger.log(.assert("Unknown structure name.")) + return [] + } + + let dependencyList = try source.substructures + .filter { $0.attributes.contains(SwiftDeclarationAttributeKind._custom.rawValue) } + .compactMap { + try found( + $0, + root: source, + fileContent: fileContent, + typealiasMap: typealiasMap + ) + } + + guard !dependencyList.isEmpty else { return [] } + + return [ + InjectProtocolResult( + name, + dependencies: dependencyList, + valueType: source.kind == SwiftDeclarationKind.struct.rawValue + ) + ] + } +} diff --git a/Binary/Sources/Deli/Runner/Parser/InjectParser.swift b/Binary/Sources/Deli/Runner/Parser/InjectParser.swift index 44bad0a..069a1f4 100644 --- a/Binary/Sources/Deli/Runner/Parser/InjectParser.swift +++ b/Binary/Sources/Deli/Runner/Parser/InjectParser.swift @@ -34,7 +34,12 @@ final class InjectParser: Parsable { // MARK: - Private - private func found(_ source: Structure, root: Structure, fileContent: String) throws -> Dependency? { + private func found( + _ source: Structure, + root: Structure, + fileContent: String, + typealiasMap: [String: String] + ) throws -> Dependency? { guard let rootName = root.name else { return nil } guard let name = source.name else { return nil } guard name == Constant.functionName || name.hasSuffix(".\(Constant.functionName)") else { return nil } @@ -91,7 +96,7 @@ final class InjectParser: Parsable { return Dependency( parent: rootName, target: source, - name: arrayType, + name: typealiasMap[arrayType] ?? arrayType, type: .array, rule: isPayload ? .payload : .default, qualifier: qualifier, @@ -101,22 +106,30 @@ final class InjectParser: Parsable { return Dependency( parent: rootName, target: source, - name: typeName, + name: typealiasMap[typeName] ?? typeName, rule: isPayload ? .payload : .default, qualifier: qualifier, qualifierBy: qualifierBy ) } - private func searchInject(_ source: Structure, fileContent: String) throws -> [Dependency] { + private func searchInject( + _ source: Structure, + fileContent: String, + typealiasMap: [String: String] + ) throws -> [Dependency] { var dependencyList = [Dependency]() var queue = source.substructures while let item = queue.popLast() { queue.append(contentsOf: item.substructures) - if let dependency = try found(item, root: source, fileContent: fileContent) { - dependencyList.append(dependency) - } + + try found( + item, + root: source, + fileContent: fileContent, + typealiasMap: typealiasMap + ).map { dependencyList.append($0) } } return dependencyList @@ -124,11 +137,28 @@ final class InjectParser: Parsable { // MARK: - Public - func parse(by source: Structure, fileContent: String) throws -> [Results] { - return try parse(by: source, fileContent: fileContent, isInheritanceCheck: true) + func parse( + by source: Structure, + fileContent: String, + typePrefix: String, + typealiasMap: [String: String] + ) throws -> [Results] { + return try parse( + by: source, + fileContent: fileContent, + isInheritanceCheck: true, + typePrefix: typePrefix, + typealiasMap: typealiasMap + ) } - func parse(by source: Structure, fileContent: String, isInheritanceCheck: Bool) throws -> [Results] { - guard let name = source.name else { + func parse( + by source: Structure, + fileContent: String, + isInheritanceCheck: Bool, + typePrefix: String, + typealiasMap: [String: String] + ) throws -> [Results] { + guard let name = source.name.map({ typePrefix + $0 }) else { Logger.log(.assert("Unknown structure name.")) return [] } @@ -136,7 +166,11 @@ final class InjectParser: Parsable { guard source.inheritedTypes.contains(where: { Constant.inheritanceName.contains($0) }) else { return [] } } - let dependencyList = try searchInject(source, fileContent: fileContent) + let dependencyList = try searchInject( + source, + fileContent: fileContent, + typealiasMap: typealiasMap + ) return [ InjectProtocolResult( name, diff --git a/Binary/Sources/Deli/Runner/Parser/InjectPropertyParser.swift b/Binary/Sources/Deli/Runner/Parser/InjectPropertyParser.swift index 6e471a2..d402770 100644 --- a/Binary/Sources/Deli/Runner/Parser/InjectPropertyParser.swift +++ b/Binary/Sources/Deli/Runner/Parser/InjectPropertyParser.swift @@ -20,7 +20,11 @@ final class InjectPropertyParser: Parsable { // MARK: - Private - private func found(_ source: Structure, root: Structure, fileContent: String) throws -> String? { + private func found( + _ source: Structure, + root: Structure, + fileContent: String + ) throws -> String? { guard let name = source.name else { return nil } guard name == Constant.functionName || name.hasSuffix(".\(Constant.functionName)") else { return nil } guard source.kind == Constant.functionCallKey else { return nil } @@ -36,7 +40,10 @@ final class InjectPropertyParser: Parsable { return path } - private func searchInjectProperty(_ source: Structure, fileContent: String) throws -> [String] { + private func searchInjectProperty( + _ source: Structure, + fileContent: String + ) throws -> [String] { var pathList = [String]() var queue = source.substructures @@ -52,8 +59,13 @@ final class InjectPropertyParser: Parsable { // MARK: - Public - func parse(by source: Structure, fileContent: String) throws -> [Results] { - guard let name = source.name else { + func parse( + by source: Structure, + fileContent: String, + typePrefix: String, + typealiasMap: [String: String] + ) throws -> [Results] { + guard let name = source.name.map({ typePrefix + $0 }) else { Logger.log(.assert("Unknown structure name.")) return [] } diff --git a/Binary/Sources/Deli/Runner/Parser/LazyAutowiredFactoryParser.swift b/Binary/Sources/Deli/Runner/Parser/LazyAutowiredFactoryParser.swift index c73addf..d7d255a 100644 --- a/Binary/Sources/Deli/Runner/Parser/LazyAutowiredFactoryParser.swift +++ b/Binary/Sources/Deli/Runner/Parser/LazyAutowiredFactoryParser.swift @@ -29,7 +29,11 @@ final class LazyAutowiredFactoryParser: Parsable { // MARK: - Private - private func convert(name: String, fileContent: String) -> String? { + private func convert( + name: String, + fileContent: String, + typealiasMap: [String: String] + ) -> String? { guard let nameMatch = Constant.typeRegex.findFirst(in: name) else { return name } guard let nameResult = nameMatch.group(at: 2) else { return name } @@ -39,7 +43,11 @@ final class LazyAutowiredFactoryParser: Parsable { guard let typeResult = typeMatch.group(at: 1) else { return nil } return typeResult } - private func convertPayload(name: String, fileContent: String) -> String? { + private func convertPayload( + name: String, + fileContent: String, + typealiasMap: [String: String] + ) -> String? { guard let nameMatch = Constant.payloadTypeRegex.findFirst(in: name) else { return name } guard let payloadName = nameMatch.group(at: 2) else { return name } @@ -69,8 +77,13 @@ final class LazyAutowiredFactoryParser: Parsable { // MARK: - Public - func parse(by source: Structure, fileContent: String) throws -> [Results] { - guard let name = source.name else { + func parse( + by source: Structure, + fileContent: String, + typePrefix: String, + typealiasMap: [String: String] + ) throws -> [Results] { + guard let name = source.name.map({ typePrefix + $0 }) else { Logger.log(.assert("Unknown structure name.")) return [] } @@ -126,7 +139,7 @@ final class LazyAutowiredFactoryParser: Parsable { Logger.log(.error("Unknown `\(name)` dependency type.", info.getSourceLine(with: fileContent))) throw ParserError.typeNotFound } - guard let dependencyName = convert(name: typeName, fileContent: fileContent) else { + guard let dependencyName = convert(name: typeName, fileContent: fileContent, typealiasMap: typealiasMap) else { Logger.log(.error("Not found an aliased type named `\(name).\(typeName)`.", info.getSourceLine(with: fileContent))) throw ParserError.typeNotFound } @@ -138,7 +151,7 @@ final class LazyAutowiredFactoryParser: Parsable { return Dependency( parent: name, target: injector, - name: arrayType, + name: typealiasMap[arrayType] ?? arrayType, type: .array, qualifier: qualifier, qualifierBy: qualifierBy @@ -147,7 +160,7 @@ final class LazyAutowiredFactoryParser: Parsable { return Dependency( parent: name, target: injector, - name: dependencyName, + name: typealiasMap[dependencyName] ?? dependencyName, qualifier: qualifier, qualifierBy: qualifierBy ) @@ -162,7 +175,7 @@ final class LazyAutowiredFactoryParser: Parsable { Logger.log(.error("Not found payload type.", info.getSourceLine(with: fileContent))) throw ParserError.payloadNotFound } - guard let payloadName = convertPayload(name: typeName, fileContent: fileContent) else { + guard let payloadName = convertPayload(name: typeName, fileContent: fileContent, typealiasMap: typealiasMap) else { Logger.log(.error("Not found an aliased type named `\(name).\(typeName)`.", info.getSourceLine(with: fileContent))) throw ParserError.payloadNotFound } @@ -170,7 +183,7 @@ final class LazyAutowiredFactoryParser: Parsable { return Dependency( parent: name, target: constructor, - name: payloadName + name: typealiasMap[payloadName] ?? payloadName ) }() diff --git a/Binary/Sources/Deli/Runner/Parser/LazyAutowiredParser.swift b/Binary/Sources/Deli/Runner/Parser/LazyAutowiredParser.swift index eb59b71..3cd97a1 100644 --- a/Binary/Sources/Deli/Runner/Parser/LazyAutowiredParser.swift +++ b/Binary/Sources/Deli/Runner/Parser/LazyAutowiredParser.swift @@ -23,7 +23,11 @@ final class LazyAutowiredParser: Parsable { // MARK: - Private - private func convert(name: String, fileContent: String) -> String? { + private func convert( + name: String, + fileContent: String, + typealiasMap: [String: String] + ) -> String? { guard let nameMatch = Constant.typeRegex.findFirst(in: name) else { return name } guard let nameResult = nameMatch.group(at: 2) else { return name } @@ -43,8 +47,13 @@ final class LazyAutowiredParser: Parsable { // MARK: - Public - func parse(by source: Structure, fileContent: String) throws -> [Results] { - guard let name = source.name else { + func parse( + by source: Structure, + fileContent: String, + typePrefix: String, + typealiasMap: [String: String] + ) throws -> [Results] { + guard let name = source.name.map({ typePrefix + $0 }) else { Logger.log(.assert("Unknown structure name.")) return [] } @@ -86,7 +95,7 @@ final class LazyAutowiredParser: Parsable { Logger.log(.error("Unknown `\(name)` dependency type.", info.getSourceLine(with: fileContent))) throw ParserError.typeNotFound } - guard let dependencyName = convert(name: typeName, fileContent: fileContent) else { + guard let dependencyName = convert(name: typeName, fileContent: fileContent, typealiasMap: typealiasMap) else { Logger.log(.error("Not found an aliased type named `\(name).\(typeName)`.", info.getSourceLine(with: fileContent))) throw ParserError.typeNotFound } @@ -98,7 +107,7 @@ final class LazyAutowiredParser: Parsable { return Dependency( parent: name, target: injector, - name: arrayType, + name: typealiasMap[arrayType] ?? arrayType, type: .array, qualifier: qualifier, qualifierBy: qualifierBy @@ -107,7 +116,7 @@ final class LazyAutowiredParser: Parsable { return Dependency( parent: name, target: injector, - name: dependencyName, + name: typealiasMap[dependencyName] ?? dependencyName, qualifier: qualifier, qualifierBy: qualifierBy ) diff --git a/Binary/Sources/Deli/Runner/Parser/PropertyValueParser.swift b/Binary/Sources/Deli/Runner/Parser/PropertyValueParser.swift new file mode 100644 index 0000000..5ee2c9b --- /dev/null +++ b/Binary/Sources/Deli/Runner/Parser/PropertyValueParser.swift @@ -0,0 +1,73 @@ +// +// PropertyValueParser.swift +// deli +// +// Created by Kawoou on 2020/03/06. +// + +import SourceKittenFramework + +final class PropertyValueParser: Parsable { + + // MARK: - Constant + + private struct Constant { + static let propertyWrapper = "PropertyValue" + + static let propertyWrapperRegex = "@(PropertyValue)(\\(([^\\(]*(\\([^\\)]*\\))*[^\\)]*)\\))?".r! + + static let pathParseRegEx = "\"((\\\"|[^\\\"]+)+)\"".r! + } + + // MARK: - Private + + private func found( + _ source: Structure, + root: Structure, + fileContent: String + ) throws -> String? { + guard let attributeOffset = source.attributeOffsets.first else { return nil } + guard let attributeLength = source.attributeLengths.first else { return nil } + guard let attributeName = fileContent.utf8[Int(attributeOffset).. [Results] { + guard let name = source.name.map({ typePrefix + $0 }) else { + Logger.log(.assert("Unknown structure name.")) + return [] + } + + let pathList = try source.substructures + .filter { $0.attributes.contains(SwiftDeclarationAttributeKind._custom.rawValue) } + .compactMap { + try found($0, root: source, fileContent: fileContent) + } + + guard !pathList.isEmpty else { return [] } + + return [ + InjectPropertyResult( + name, + propertyKeys: pathList, + valueType: source.kind == SwiftDeclarationKind.struct.rawValue + ) + ] + } +} diff --git a/Binary/Sources/Deli/Runner/Parser/Result/AutowiredConstructorResult.swift b/Binary/Sources/Deli/Runner/Parser/Result/AutowiredConstructorResult.swift index 8e25f09..b91f7b1 100644 --- a/Binary/Sources/Deli/Runner/Parser/Result/AutowiredConstructorResult.swift +++ b/Binary/Sources/Deli/Runner/Parser/Result/AutowiredConstructorResult.swift @@ -44,12 +44,12 @@ final class AutowiredConstructorResult: Results { switch dependency.type { case .single: return [ - "let _qualifier\(index) = context.getProperty(\"\(qualifierBy)\") as! String", + "let _qualifier\(index) = context.getProperty(\"\(qualifierBy)\", type: String.self)!", "let _\(index) = context.get(\(dependency.name).self, qualifier: _qualifier\(index))!" ] case .array: return [ - "let _qualifier\(index) = context.getProperty(\"\(qualifierBy)\") as! String", + "let _qualifier\(index) = context.getProperty(\"\(qualifierBy)\", type: String.self)!", "let _\(index) = context.get([\(dependency.name)].self, qualifier: _qualifier\(index))" ] } diff --git a/Binary/Sources/Deli/Runner/Parser/Result/AutowiredFactoryConstructorResult.swift b/Binary/Sources/Deli/Runner/Parser/Result/AutowiredFactoryConstructorResult.swift index 890c393..11e7e70 100644 --- a/Binary/Sources/Deli/Runner/Parser/Result/AutowiredFactoryConstructorResult.swift +++ b/Binary/Sources/Deli/Runner/Parser/Result/AutowiredFactoryConstructorResult.swift @@ -47,12 +47,12 @@ final class AutowiredFactoryConstructorResult: Results { switch dependency.type { case .single: return [ - "let _qualifier\(index) = context.getProperty(\"\(qualifierBy)\") as! String", + "let _qualifier\(index) = context.getProperty(\"\(qualifierBy)\", type: String.self)!", "let _\(index) = context.get(\(dependency.name).self, qualifier: _qualifier\(index))!" ] case .array: return [ - "let _qualifier\(index) = context.getProperty(\"\(qualifierBy)\") as! String", + "let _qualifier\(index) = context.getProperty(\"\(qualifierBy)\", type: String.self)!", "let _\(index) = context.get([\(dependency.name)].self, qualifier: _qualifier\(index))" ] } diff --git a/Binary/Sources/Deli/Runner/Parser/Result/ConfigPropertyResult.swift b/Binary/Sources/Deli/Runner/Parser/Result/ConfigPropertyResult.swift index 590245b..52aa0e3 100644 --- a/Binary/Sources/Deli/Runner/Parser/Result/ConfigPropertyResult.swift +++ b/Binary/Sources/Deli/Runner/Parser/Result/ConfigPropertyResult.swift @@ -4,6 +4,12 @@ // final class ConfigPropertyResult: Results { + struct PropertyInfo { + let type: String + let name: String + let isOptional: Bool + } + var valueType: Bool var isLazy: Bool { return false } var isFactory: Bool { return false } @@ -18,28 +24,25 @@ final class ConfigPropertyResult: Results { var linkType: Set = Set() let propertyTargetKey: String - let propertyKeys: [String] - var propertyValues: [String] = [] + let propertyInfos: [PropertyInfo] init( _ instanceType: String, propertyTargetKey: String, - propertyKeys: [String], + propertyInfos: [PropertyInfo], valueType: Bool ) { self.valueType = valueType self.instanceType = instanceType self.propertyTargetKey = propertyTargetKey - self.propertyKeys = propertyKeys + self.propertyInfos = propertyInfos } func makeSource() -> String? { - let properties = propertyKeys.enumerated() + let properties = propertyInfos.enumerated() .map { (index, key) in - if propertyKeys.count == index + 1 { - return "\(key): context.getProperty(\"\(propertyTargetKey).\(key)\") as! String" - } else { - return "\(key): context.getProperty(\"\(propertyTargetKey).\(key)\") as! String," - } + let unwrappingCharacter = (key.isOptional) ? "" : "!" + let nextCharacter = (propertyInfos.count == index + 1) ? "" : "," + return "\(key.name): context.getProperty(\"\(propertyTargetKey).\(key.name)\", type: \(key.type).self)\(unwrappingCharacter)\(nextCharacter)" } .joined(separator: "\n ") diff --git a/Binary/Sources/Deli/Runner/Parser/Result/LazyAutowiredConstructorResult.swift b/Binary/Sources/Deli/Runner/Parser/Result/LazyAutowiredConstructorResult.swift index d12bfe4..5c02953 100644 --- a/Binary/Sources/Deli/Runner/Parser/Result/LazyAutowiredConstructorResult.swift +++ b/Binary/Sources/Deli/Runner/Parser/Result/LazyAutowiredConstructorResult.swift @@ -44,12 +44,12 @@ final class LazyAutowiredConstructorResult: Results { switch dependency.type { case .single: return [ - "let _qualifier\(index) = context.getProperty(\"\(qualifierBy)\") as! String", + "let _qualifier\(index) = context.getProperty(\"\(qualifierBy)\", type: String.self)!", "let _\(index) = context.get(\(dependency.name).self, qualifier: _qualifier\(index))!" ] case .array: return [ - "let _qualifier\(index) = context.getProperty(\"\(qualifierBy)\") as! String", + "let _qualifier\(index) = context.getProperty(\"\(qualifierBy)\", type: String.self)!", "let _\(index) = context.get([\(dependency.name)].self, qualifier: _qualifier\(index))" ] } diff --git a/Binary/Sources/Deli/Runner/Parser/Result/LazyAutowiredFactoryConstructorResult.swift b/Binary/Sources/Deli/Runner/Parser/Result/LazyAutowiredFactoryConstructorResult.swift index c7c5e20..f6985a3 100644 --- a/Binary/Sources/Deli/Runner/Parser/Result/LazyAutowiredFactoryConstructorResult.swift +++ b/Binary/Sources/Deli/Runner/Parser/Result/LazyAutowiredFactoryConstructorResult.swift @@ -47,12 +47,12 @@ final class LazyAutowiredFactoryConstructorResult: Results { switch dependency.type { case .single: return [ - "let _qualifier\(index) = context.getProperty(\"\(qualifierBy)\") as! String", + "let _qualifier\(index) = context.getProperty(\"\(qualifierBy)\", type: String.self)!", "let _\(index) = context.get(\(dependency.name).self, qualifier: _qualifier\(index))!" ] case .array: return [ - "let _qualifier\(index) = context.getProperty(\"\(qualifierBy)\") as! String", + "let _qualifier\(index) = context.getProperty(\"\(qualifierBy)\", type: String.self)!", "let _\(index) = context.get([\(dependency.name)].self, qualifier: _qualifier\(index))" ] } diff --git a/Binary/Sources/Deli/Runner/Parser/Result/ResolveResult.swift b/Binary/Sources/Deli/Runner/Parser/Result/ResolveResult.swift new file mode 100644 index 0000000..ef65979 --- /dev/null +++ b/Binary/Sources/Deli/Runner/Parser/Result/ResolveResult.swift @@ -0,0 +1,37 @@ +// +// ResolveResult.swift +// deli +// +// Created by Kawoou on 07/02/2019. +// + +final class ResolveResult: Results { + let valueType: Bool + let isLazy: Bool + let isFactory: Bool + let isRegister: Bool + let isResolved: Bool = true + let instanceType: String + var scope: String? + var qualifier: String? + var dependencies: [Dependency] + var instanceDependency: [Dependency] + var imports: [String] + var linkType: Set + + init(_ data: ResolveData.Dependency, imports: [String]) { + self.valueType = data.isValueType + self.isLazy = data.isLazy + self.isFactory = data.isFactory + self.isRegister = true + self.instanceType = data.type + self.scope = "unknown" + self.qualifier = data.qualifier + self.dependencies = data.dependencies.map { + Dependency(parent: data.type, target: nil, name: $0.type) + } + self.instanceDependency = self.dependencies + self.imports = imports + self.linkType = Set(data.linkType) + } +} diff --git a/Binary/Sources/Deli/Runner/ParserSupport.swift b/Binary/Sources/Deli/Runner/ParserSupport.swift index 1d7a59f..9203f24 100644 --- a/Binary/Sources/Deli/Runner/ParserSupport.swift +++ b/Binary/Sources/Deli/Runner/ParserSupport.swift @@ -33,34 +33,21 @@ func parseScope(_ source: Structure, fileContent: String) throws -> String? { } throw ParserError.scopeAmbiguous } - - #if swift(>=4.1) - return scopeList.compactMap { info in - guard let data = fileContent.utf8[Int(info.offset).. String? { guard let name = source.name else { @@ -78,32 +65,21 @@ func parseQualifier(_ source: Structure, fileContent: String) throws -> String? } throw ParserError.qualifierAmbiguous } - - #if swift(>=4.1) - return qualifierList.compactMap { info in - guard let data = fileContent.utf8[Int(info.offset).. String? { let range = Int(source.offset).. [String: Any] { + guard !origin.isEmpty else { return target } + guard !target.isEmpty else { return origin } + var newDict = origin for (key, value) in target { @@ -66,7 +71,7 @@ final class PropertyParser { func load(_ fileList: [String]) { properties = fileList - .compactMap { URL(string: $0) } + .map { URL(fileURLWithPath: $0) } .reduce([:]) { (dict, url) -> [String: Any] in let ext = url.pathExtension let result: [String: Any] diff --git a/Binary/Sources/Deli/Runner/ResolveParser.swift b/Binary/Sources/Deli/Runner/ResolveParser.swift new file mode 100644 index 0000000..dc8b21e --- /dev/null +++ b/Binary/Sources/Deli/Runner/ResolveParser.swift @@ -0,0 +1,67 @@ +// +// ResolveParser.swift +// Deli +// + +import Foundation +import Yams + +final class ResolveParser { + + // MARK: - Constant + + struct Constant { + static let resolveFile = "Deli.resolved" + } + + // MARK: - Property + + private(set) var properties: [String: [String: Any]] = [:] + + // NARK: - Public + + func load(_ infoList: [ConfigDependencyInfo]) throws { + let decoder = YAMLDecoder() + + dependencies = try infoList + .compactMap { info -> ConfigDependencyInfo? in + let url = URL(fileURLWithPath: info.path) + + let fileManager = FileManager.default + var isDirectory: ObjCBool = false + guard fileManager.fileExists(atPath: info.path, isDirectory: &isDirectory) else { + Logger.log(.warn("Not found dependency resolved file on `\(info.path)`.", nil)) + return nil + } + guard isDirectory.boolValue else { return info } + + let newPath = url.appendingPathComponent(Constant.resolveFile).path + guard fileManager.fileExists(atPath: newPath) else { + Logger.log(.warn("Not found dependency resolved file on `\(newPath)`.", nil)) + return nil + } + return ConfigDependencyInfo(path: newPath, imports: info.imports) + } + .flatMap { info -> [ResolveResult] in + let data = try String(contentsOfFile: info.path, encoding: .utf8) + let resolveData = try decoder.decode(ResolveData.self, from: data) + return resolveData.dependency + .map { ResolveResult($0, imports: info.imports) } + } + } + + func run(_ data: [Results]) throws -> [Results] { + return data + dependencies + } + func reset() { + dependencies = [] + } + + // MARK: - Private + + private var dependencies: [Results] = [] + + // MARK: - Lifecycle + + init() {} +} diff --git a/Binary/Sources/Deli/Runner/Validator/CircularDependencyValidator.swift b/Binary/Sources/Deli/Runner/Validator/CircularDependencyValidator.swift index f730275..e56980e 100644 --- a/Binary/Sources/Deli/Runner/Validator/CircularDependencyValidator.swift +++ b/Binary/Sources/Deli/Runner/Validator/CircularDependencyValidator.swift @@ -22,16 +22,9 @@ final class CircularDependencyValidator: Validatable { let stackSet = Set(chainStack) guard stackSet.count != chainStack.count else { return } - let results: [Results] - #if swift(>=4.1) - results = stackSet + let results = stackSet .compactMap { resultMap[$0] } .flatMap { $0 } - #else - results = stackSet - .flatMap { resultMap[$0] } - .flatMap { $0 } - #endif let isInnerLazy = results.reduce(false) { $0 || $1.isLazy } guard isInnerLazy == false else { return } diff --git a/Binary/Sources/Deli/Type/Dependency.swift b/Binary/Sources/Deli/Type/Dependency.swift index 62b633f..3ca826a 100644 --- a/Binary/Sources/Deli/Type/Dependency.swift +++ b/Binary/Sources/Deli/Type/Dependency.swift @@ -40,7 +40,6 @@ struct Dependency { } } extension Dependency: Hashable { -#if swift(>=4.2) func hash(into hasher: inout Hasher) { hasher.combine(name) hasher.combine(type) @@ -48,13 +47,8 @@ extension Dependency: Hashable { hasher.combine(qualifier) hasher.combine(qualifierBy) } -#else - var hashValue: Int { - return name.hashValue ^ type.hashValue ^ rule.hashValue ^ qualifier.hashValue ^ qualifierBy.hashValue - } -#endif - static func ==(lhs: Dependency, rhs: Dependency) -> Bool { + static func == (lhs: Dependency, rhs: Dependency) -> Bool { guard lhs.name == rhs.name else { return false } guard lhs.type == rhs.type else { return false } guard lhs.rule == rhs.rule else { return false } diff --git a/Binary/Sources/Deli/Type/DependencyParsable.swift b/Binary/Sources/Deli/Type/DependencyParsable.swift index 7a122ba..208be11 100644 --- a/Binary/Sources/Deli/Type/DependencyParsable.swift +++ b/Binary/Sources/Deli/Type/DependencyParsable.swift @@ -4,5 +4,10 @@ // protocol DependencyParsable { - func parse(by source: Structure, fileContent: String) throws -> [Dependency] + func parse( + by source: Structure, + fileContent: String, + typePrefix: String, + typealiasMap: [String: String] + ) throws -> [Dependency] } diff --git a/Binary/Sources/Deli/Type/Parsable.swift b/Binary/Sources/Deli/Type/Parsable.swift index e0d2e41..237034c 100644 --- a/Binary/Sources/Deli/Type/Parsable.swift +++ b/Binary/Sources/Deli/Type/Parsable.swift @@ -6,7 +6,12 @@ protocol Parsable { var dependency: [DependencyParsable] { get } - func parse(by source: Structure, fileContent: String) throws -> [Results] + func parse( + by source: Structure, + fileContent: String, + typePrefix: String, + typealiasMap: [String: String] + ) throws -> [Results] } extension Parsable { var dependency: [DependencyParsable] { diff --git a/Deli.xcodeproj/CwlCatchExceptionSupport_Info.plist b/Deli.xcodeproj/CwlCatchExceptionSupport_Info.plist new file mode 100644 index 0000000..57ada9f --- /dev/null +++ b/Deli.xcodeproj/CwlCatchExceptionSupport_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/Deli.xcodeproj/CwlCatchException_Info.plist b/Deli.xcodeproj/CwlCatchException_Info.plist new file mode 100644 index 0000000..57ada9f --- /dev/null +++ b/Deli.xcodeproj/CwlCatchException_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/Deli.xcodeproj/CwlMachBadInstructionHandler_Info.plist b/Deli.xcodeproj/CwlMachBadInstructionHandler_Info.plist new file mode 100644 index 0000000..57ada9f --- /dev/null +++ b/Deli.xcodeproj/CwlMachBadInstructionHandler_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/Deli.xcodeproj/CwlPreconditionTesting_Info.plist b/Deli.xcodeproj/CwlPreconditionTesting_Info.plist new file mode 100644 index 0000000..57ada9f --- /dev/null +++ b/Deli.xcodeproj/CwlPreconditionTesting_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/Deli.xcodeproj/GeneratedModuleMap/CwlCatchExceptionSupport/module.modulemap b/Deli.xcodeproj/GeneratedModuleMap/CwlCatchExceptionSupport/module.modulemap new file mode 100644 index 0000000..634d0e1 --- /dev/null +++ b/Deli.xcodeproj/GeneratedModuleMap/CwlCatchExceptionSupport/module.modulemap @@ -0,0 +1,4 @@ +module CwlCatchExceptionSupport { + umbrella "/Users/kawoou/GitHub/Deli/.build/checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/include" + export * +} diff --git a/Deli.xcodeproj/project.pbxproj b/Deli.xcodeproj/project.pbxproj index 1642849..ea938c6 100644 --- a/Deli.xcodeproj/project.pbxproj +++ b/Deli.xcodeproj/project.pbxproj @@ -1,1676 +1,3198 @@ // !$*UTF8*$! { - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXAggregateTarget section */ - Deli::DeliPackageTests::ProductTarget /* DeliPackageTests */ = { - isa = PBXAggregateTarget; - buildConfigurationList = OBJ_235 /* Build configuration list for PBXAggregateTarget "DeliPackageTests" */; - buildPhases = ( - ); - dependencies = ( - OBJ_238 /* PBXTargetDependency */, - ); - name = DeliPackageTests; - productName = DeliPackageTests; - }; -/* End PBXAggregateTarget section */ - -/* Begin PBXBuildFile section */ - OBJ_203 /* Autowired.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_9 /* Autowired.swift */; }; - OBJ_204 /* AutowiredFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_10 /* AutowiredFactory.swift */; }; - OBJ_205 /* Component.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_11 /* Component.swift */; }; - OBJ_206 /* ConfigProperty.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_12 /* ConfigProperty.swift */; }; - OBJ_207 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_13 /* Configuration.swift */; }; - OBJ_208 /* AppContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_15 /* AppContext.swift */; }; - OBJ_209 /* ContainerComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_17 /* ContainerComponent.swift */; }; - OBJ_210 /* DefaultContainerComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_18 /* DefaultContainerComponent.swift */; }; - OBJ_211 /* FactoryContainerComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_19 /* FactoryContainerComponent.swift */; }; - OBJ_212 /* Container.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_20 /* Container.swift */; }; - OBJ_213 /* ContainerError.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_22 /* ContainerError.swift */; }; - OBJ_214 /* FactoryResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_24 /* FactoryResolver.swift */; }; - OBJ_215 /* Linker.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_25 /* Linker.swift */; }; - OBJ_216 /* LoadPriority.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_26 /* LoadPriority.swift */; }; - OBJ_217 /* ResolveRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_27 /* ResolveRule.swift */; }; - OBJ_218 /* Resolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_28 /* Resolver.swift */; }; - OBJ_219 /* Scope.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_29 /* Scope.swift */; }; - OBJ_220 /* TypeKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_30 /* TypeKey.swift */; }; - OBJ_221 /* Factory.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_31 /* Factory.swift */; }; - OBJ_222 /* Inject.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_32 /* Inject.swift */; }; - OBJ_223 /* LazyAutowired.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_33 /* LazyAutowired.swift */; }; - OBJ_224 /* LazyAutowiredFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_34 /* LazyAutowiredFactory.swift */; }; - OBJ_225 /* ModuleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_35 /* ModuleFactory.swift */; }; - OBJ_226 /* Payload.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_36 /* Payload.swift */; }; - OBJ_233 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_6 /* Package.swift */; }; - OBJ_244 /* AccountConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_40 /* AccountConfiguration.swift */; }; - OBJ_245 /* AccountService.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_41 /* AccountService.swift */; }; - OBJ_246 /* AlwaysModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_42 /* AlwaysModel.swift */; }; - OBJ_247 /* Book.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_44 /* Book.swift */; }; - OBJ_248 /* COSMOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_45 /* COSMOS.swift */; }; - OBJ_249 /* HarryPotter.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_46 /* HarryPotter.swift */; }; - OBJ_250 /* Novel.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_47 /* Novel.swift */; }; - OBJ_251 /* Science.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_48 /* Science.swift */; }; - OBJ_252 /* TroisiemeHumanite.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_49 /* TroisiemeHumanite.swift */; }; - OBJ_253 /* DeliFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_50 /* DeliFactory.swift */; }; - OBJ_254 /* FactoryTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_51 /* FactoryTest.swift */; }; - OBJ_255 /* Friend.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_52 /* Friend.swift */; }; - OBJ_256 /* FriendInfoViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_53 /* FriendInfoViewModel.swift */; }; - OBJ_257 /* FriendListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_54 /* FriendListViewModel.swift */; }; - OBJ_258 /* FriendPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_55 /* FriendPayload.swift */; }; - OBJ_259 /* FriendService.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_56 /* FriendService.swift */; }; - OBJ_260 /* LazyAutowiredQualifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_57 /* LazyAutowiredQualifier.swift */; }; - OBJ_261 /* LibraryService.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_58 /* LibraryService.swift */; }; - OBJ_262 /* MessageService.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_59 /* MessageService.swift */; }; - OBJ_263 /* NetworkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_60 /* NetworkManager.swift */; }; - OBJ_264 /* InjectPropertyTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_62 /* InjectPropertyTest.swift */; }; - OBJ_265 /* NetworkMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_63 /* NetworkMethod.swift */; }; - OBJ_266 /* NetworkProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_64 /* NetworkProvider.swift */; }; - OBJ_267 /* PropertyAutowired.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_65 /* PropertyAutowired.swift */; }; - OBJ_268 /* PropertyAutowiredFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_66 /* PropertyAutowiredFactory.swift */; }; - OBJ_269 /* PropertyInject.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_67 /* PropertyInject.swift */; }; - OBJ_270 /* PropertyLazyAutowired.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_68 /* PropertyLazyAutowired.swift */; }; - OBJ_271 /* PropertyLazyAutowiredFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_69 /* PropertyLazyAutowiredFactory.swift */; }; - OBJ_272 /* ServerConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_70 /* ServerConfig.swift */; }; - OBJ_273 /* Robot.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_72 /* Robot.swift */; }; - OBJ_274 /* RobotBody.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_73 /* RobotBody.swift */; }; - OBJ_275 /* RobotFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_74 /* RobotFactory.swift */; }; - OBJ_276 /* RobotHead.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_75 /* RobotHead.swift */; }; - OBJ_277 /* StructWithAutowired.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_77 /* StructWithAutowired.swift */; }; - OBJ_278 /* StructWithAutowiredFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_78 /* StructWithAutowiredFactory.swift */; }; - OBJ_279 /* StructWithComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_79 /* StructWithComponent.swift */; }; - OBJ_280 /* StructWithLazyAutowired.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_80 /* StructWithLazyAutowired.swift */; }; - OBJ_281 /* TestNotRegister.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_81 /* TestNotRegister.swift */; }; - OBJ_282 /* TestPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_82 /* TestPayload.swift */; }; - OBJ_283 /* TestRegister.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_83 /* TestRegister.swift */; }; - OBJ_284 /* TestService.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_84 /* TestService.swift */; }; - OBJ_285 /* TestView1.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_85 /* TestView1.swift */; }; - OBJ_286 /* TestView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_86 /* TestView2.swift */; }; - OBJ_287 /* TestView3.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_87 /* TestView3.swift */; }; - OBJ_288 /* TestViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_88 /* TestViewModel.swift */; }; - OBJ_289 /* UnicodeTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_89 /* UnicodeTest.swift */; }; - OBJ_290 /* UserPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_90 /* UserPayload.swift */; }; - OBJ_291 /* UserViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_91 /* UserViewModel.swift */; }; - OBJ_292 /* WeakViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_92 /* WeakViewModel.swift */; }; - OBJ_293 /* DeliSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_93 /* DeliSpec.swift */; }; - OBJ_294 /* MockAccountService.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_95 /* MockAccountService.swift */; }; - OBJ_295 /* MockBook.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_96 /* MockBook.swift */; }; - OBJ_297 /* Nimble.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = Nimble::Nimble::Product /* Nimble.framework */; }; - OBJ_298 /* Quick.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = Quick::Quick::Product /* Quick.framework */; }; - OBJ_299 /* QuickSpecBase.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = Quick::QuickSpecBase::Product /* QuickSpecBase.framework */; }; - OBJ_300 /* Deli.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = Deli::Deli::Product /* Deli.framework */; }; - OBJ_312 /* AdapterProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_137 /* AdapterProtocols.swift */; }; - OBJ_313 /* AssertionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_138 /* AssertionDispatcher.swift */; }; - OBJ_314 /* AssertionRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_139 /* AssertionRecorder.swift */; }; - OBJ_315 /* NMBExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_140 /* NMBExpectation.swift */; }; - OBJ_316 /* NMBObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_141 /* NMBObjCMatcher.swift */; }; - OBJ_317 /* NimbleEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_142 /* NimbleEnvironment.swift */; }; - OBJ_318 /* NimbleXCTestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_143 /* NimbleXCTestHandler.swift */; }; - OBJ_319 /* ExceptionCapture.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_145 /* ExceptionCapture.swift */; }; - OBJ_320 /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_146 /* DSL+Wait.swift */; }; - OBJ_321 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_147 /* DSL.swift */; }; - OBJ_322 /* Expectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_148 /* Expectation.swift */; }; - OBJ_323 /* ExpectationMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_149 /* ExpectationMessage.swift */; }; - OBJ_324 /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_150 /* Expression.swift */; }; - OBJ_325 /* FailureMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_151 /* FailureMessage.swift */; }; - OBJ_326 /* AllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_153 /* AllPass.swift */; }; - OBJ_327 /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_154 /* Async.swift */; }; - OBJ_328 /* BeAKindOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_155 /* BeAKindOf.swift */; }; - OBJ_329 /* BeAnInstanceOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_156 /* BeAnInstanceOf.swift */; }; - OBJ_330 /* BeCloseTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_157 /* BeCloseTo.swift */; }; - OBJ_331 /* BeEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_158 /* BeEmpty.swift */; }; - OBJ_332 /* BeGreaterThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_159 /* BeGreaterThan.swift */; }; - OBJ_333 /* BeGreaterThanOrEqualTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_160 /* BeGreaterThanOrEqualTo.swift */; }; - OBJ_334 /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_161 /* BeIdenticalTo.swift */; }; - OBJ_335 /* BeLessThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_162 /* BeLessThan.swift */; }; - OBJ_336 /* BeLessThanOrEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_163 /* BeLessThanOrEqual.swift */; }; - OBJ_337 /* BeLogical.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_164 /* BeLogical.swift */; }; - OBJ_338 /* BeNil.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_165 /* BeNil.swift */; }; - OBJ_339 /* BeVoid.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_166 /* BeVoid.swift */; }; - OBJ_340 /* BeginWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_167 /* BeginWith.swift */; }; - OBJ_341 /* Contain.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_168 /* Contain.swift */; }; - OBJ_342 /* ContainElementSatisfying.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_169 /* ContainElementSatisfying.swift */; }; - OBJ_343 /* EndWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_170 /* EndWith.swift */; }; - OBJ_344 /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_171 /* Equal.swift */; }; - OBJ_345 /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_172 /* HaveCount.swift */; }; - OBJ_346 /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_173 /* Match.swift */; }; - OBJ_347 /* MatchError.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_174 /* MatchError.swift */; }; - OBJ_348 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_175 /* MatcherFunc.swift */; }; - OBJ_349 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_176 /* MatcherProtocols.swift */; }; - OBJ_350 /* PostNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_177 /* PostNotification.swift */; }; - OBJ_351 /* Predicate.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_178 /* Predicate.swift */; }; - OBJ_352 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_179 /* RaisesException.swift */; }; - OBJ_353 /* SatisfyAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_180 /* SatisfyAllOf.swift */; }; - OBJ_354 /* SatisfyAnyOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_181 /* SatisfyAnyOf.swift */; }; - OBJ_355 /* ThrowAssertion.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_182 /* ThrowAssertion.swift */; }; - OBJ_356 /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_183 /* ThrowError.swift */; }; - OBJ_357 /* ToSucceed.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_184 /* ToSucceed.swift */; }; - OBJ_358 /* Await.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_186 /* Await.swift */; }; - OBJ_359 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_187 /* Errors.swift */; }; - OBJ_360 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_188 /* Functional.swift */; }; - OBJ_361 /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_189 /* SourceLocation.swift */; }; - OBJ_362 /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_190 /* Stringers.swift */; }; - OBJ_369 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_191 /* Package.swift */; }; - OBJ_374 /* Behavior.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_103 /* Behavior.swift */; }; - OBJ_375 /* Callsite.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_104 /* Callsite.swift */; }; - OBJ_376 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_106 /* Configuration.swift */; }; - OBJ_377 /* QuickConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_107 /* QuickConfiguration.swift */; }; - OBJ_378 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_109 /* DSL.swift */; }; - OBJ_379 /* World+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_110 /* World+DSL.swift */; }; - OBJ_380 /* ErrorUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_111 /* ErrorUtility.swift */; }; - OBJ_381 /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_112 /* Example.swift */; }; - OBJ_382 /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_113 /* ExampleGroup.swift */; }; - OBJ_383 /* ExampleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_114 /* ExampleMetadata.swift */; }; - OBJ_384 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_115 /* Filter.swift */; }; - OBJ_385 /* Closures.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_117 /* Closures.swift */; }; - OBJ_386 /* ExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_118 /* ExampleHooks.swift */; }; - OBJ_387 /* HooksPhase.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_119 /* HooksPhase.swift */; }; - OBJ_388 /* SuiteHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_120 /* SuiteHooks.swift */; }; - OBJ_389 /* NSBundle+CurrentTestBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_121 /* NSBundle+CurrentTestBundle.swift */; }; - OBJ_390 /* NSString+C99ExtendedIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_122 /* NSString+C99ExtendedIdentifier.swift */; }; - OBJ_391 /* QuickMain.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_123 /* QuickMain.swift */; }; - OBJ_392 /* QuickSelectedTestSuiteBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_124 /* QuickSelectedTestSuiteBuilder.swift */; }; - OBJ_393 /* QuickSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_125 /* QuickSpec.swift */; }; - OBJ_394 /* QuickTestSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_126 /* QuickTestSuite.swift */; }; - OBJ_395 /* URL+FileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_127 /* URL+FileName.swift */; }; - OBJ_396 /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_128 /* World.swift */; }; - OBJ_398 /* QuickSpecBase.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = Quick::QuickSpecBase::Product /* QuickSpecBase.framework */; }; - OBJ_405 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_133 /* Package.swift */; }; - OBJ_410 /* QuickSpecBase.m in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_130 /* QuickSpecBase.m */; }; - OBJ_412 /* QuickSpecBase.h in Headers */ = {isa = PBXBuildFile; fileRef = OBJ_132 /* QuickSpecBase.h */; settings = {ATTRIBUTES = (Public, ); }; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - Deli::Deli::Product /* Deli.framework */ = {isa = PBXFileReference; path = Deli.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - Deli::DeliTests::Product /* DeliTests.xctest */ = {isa = PBXFileReference; path = DeliTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - Nimble::Nimble::Product /* Nimble.framework */ = {isa = PBXFileReference; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - OBJ_10 /* AutowiredFactory.swift */ = {isa = PBXFileReference; path = AutowiredFactory.swift; sourceTree = ""; }; - OBJ_103 /* Behavior.swift */ = {isa = PBXFileReference; path = Behavior.swift; sourceTree = ""; }; - OBJ_104 /* Callsite.swift */ = {isa = PBXFileReference; path = Callsite.swift; sourceTree = ""; }; - OBJ_106 /* Configuration.swift */ = {isa = PBXFileReference; path = Configuration.swift; sourceTree = ""; }; - OBJ_107 /* QuickConfiguration.swift */ = {isa = PBXFileReference; path = QuickConfiguration.swift; sourceTree = ""; }; - OBJ_109 /* DSL.swift */ = {isa = PBXFileReference; path = DSL.swift; sourceTree = ""; }; - OBJ_11 /* Component.swift */ = {isa = PBXFileReference; path = Component.swift; sourceTree = ""; }; - OBJ_110 /* World+DSL.swift */ = {isa = PBXFileReference; path = "World+DSL.swift"; sourceTree = ""; }; - OBJ_111 /* ErrorUtility.swift */ = {isa = PBXFileReference; path = ErrorUtility.swift; sourceTree = ""; }; - OBJ_112 /* Example.swift */ = {isa = PBXFileReference; path = Example.swift; sourceTree = ""; }; - OBJ_113 /* ExampleGroup.swift */ = {isa = PBXFileReference; path = ExampleGroup.swift; sourceTree = ""; }; - OBJ_114 /* ExampleMetadata.swift */ = {isa = PBXFileReference; path = ExampleMetadata.swift; sourceTree = ""; }; - OBJ_115 /* Filter.swift */ = {isa = PBXFileReference; path = Filter.swift; sourceTree = ""; }; - OBJ_117 /* Closures.swift */ = {isa = PBXFileReference; path = Closures.swift; sourceTree = ""; }; - OBJ_118 /* ExampleHooks.swift */ = {isa = PBXFileReference; path = ExampleHooks.swift; sourceTree = ""; }; - OBJ_119 /* HooksPhase.swift */ = {isa = PBXFileReference; path = HooksPhase.swift; sourceTree = ""; }; - OBJ_12 /* ConfigProperty.swift */ = {isa = PBXFileReference; path = ConfigProperty.swift; sourceTree = ""; }; - OBJ_120 /* SuiteHooks.swift */ = {isa = PBXFileReference; path = SuiteHooks.swift; sourceTree = ""; }; - OBJ_121 /* NSBundle+CurrentTestBundle.swift */ = {isa = PBXFileReference; path = "NSBundle+CurrentTestBundle.swift"; sourceTree = ""; }; - OBJ_122 /* NSString+C99ExtendedIdentifier.swift */ = {isa = PBXFileReference; path = "NSString+C99ExtendedIdentifier.swift"; sourceTree = ""; }; - OBJ_123 /* QuickMain.swift */ = {isa = PBXFileReference; path = QuickMain.swift; sourceTree = ""; }; - OBJ_124 /* QuickSelectedTestSuiteBuilder.swift */ = {isa = PBXFileReference; path = QuickSelectedTestSuiteBuilder.swift; sourceTree = ""; }; - OBJ_125 /* QuickSpec.swift */ = {isa = PBXFileReference; path = QuickSpec.swift; sourceTree = ""; }; - OBJ_126 /* QuickTestSuite.swift */ = {isa = PBXFileReference; path = QuickTestSuite.swift; sourceTree = ""; }; - OBJ_127 /* URL+FileName.swift */ = {isa = PBXFileReference; path = "URL+FileName.swift"; sourceTree = ""; }; - OBJ_128 /* World.swift */ = {isa = PBXFileReference; path = World.swift; sourceTree = ""; }; - OBJ_13 /* Configuration.swift */ = {isa = PBXFileReference; path = Configuration.swift; sourceTree = ""; }; - OBJ_130 /* QuickSpecBase.m */ = {isa = PBXFileReference; path = QuickSpecBase.m; sourceTree = ""; }; - OBJ_132 /* QuickSpecBase.h */ = {isa = PBXFileReference; path = QuickSpecBase.h; sourceTree = ""; }; - OBJ_133 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; name = Package.swift; path = "/Users/kawoou/GitHub/Deli/.build/checkouts/Quick.git--1364353377145539988/Package.swift"; sourceTree = ""; }; - OBJ_137 /* AdapterProtocols.swift */ = {isa = PBXFileReference; path = AdapterProtocols.swift; sourceTree = ""; }; - OBJ_138 /* AssertionDispatcher.swift */ = {isa = PBXFileReference; path = AssertionDispatcher.swift; sourceTree = ""; }; - OBJ_139 /* AssertionRecorder.swift */ = {isa = PBXFileReference; path = AssertionRecorder.swift; sourceTree = ""; }; - OBJ_140 /* NMBExpectation.swift */ = {isa = PBXFileReference; path = NMBExpectation.swift; sourceTree = ""; }; - OBJ_141 /* NMBObjCMatcher.swift */ = {isa = PBXFileReference; path = NMBObjCMatcher.swift; sourceTree = ""; }; - OBJ_142 /* NimbleEnvironment.swift */ = {isa = PBXFileReference; path = NimbleEnvironment.swift; sourceTree = ""; }; - OBJ_143 /* NimbleXCTestHandler.swift */ = {isa = PBXFileReference; path = NimbleXCTestHandler.swift; sourceTree = ""; }; - OBJ_145 /* ExceptionCapture.swift */ = {isa = PBXFileReference; path = ExceptionCapture.swift; sourceTree = ""; }; - OBJ_146 /* DSL+Wait.swift */ = {isa = PBXFileReference; path = "DSL+Wait.swift"; sourceTree = ""; }; - OBJ_147 /* DSL.swift */ = {isa = PBXFileReference; path = DSL.swift; sourceTree = ""; }; - OBJ_148 /* Expectation.swift */ = {isa = PBXFileReference; path = Expectation.swift; sourceTree = ""; }; - OBJ_149 /* ExpectationMessage.swift */ = {isa = PBXFileReference; path = ExpectationMessage.swift; sourceTree = ""; }; - OBJ_15 /* AppContext.swift */ = {isa = PBXFileReference; path = AppContext.swift; sourceTree = ""; }; - OBJ_150 /* Expression.swift */ = {isa = PBXFileReference; path = Expression.swift; sourceTree = ""; }; - OBJ_151 /* FailureMessage.swift */ = {isa = PBXFileReference; path = FailureMessage.swift; sourceTree = ""; }; - OBJ_153 /* AllPass.swift */ = {isa = PBXFileReference; path = AllPass.swift; sourceTree = ""; }; - OBJ_154 /* Async.swift */ = {isa = PBXFileReference; path = Async.swift; sourceTree = ""; }; - OBJ_155 /* BeAKindOf.swift */ = {isa = PBXFileReference; path = BeAKindOf.swift; sourceTree = ""; }; - OBJ_156 /* BeAnInstanceOf.swift */ = {isa = PBXFileReference; path = BeAnInstanceOf.swift; sourceTree = ""; }; - OBJ_157 /* BeCloseTo.swift */ = {isa = PBXFileReference; path = BeCloseTo.swift; sourceTree = ""; }; - OBJ_158 /* BeEmpty.swift */ = {isa = PBXFileReference; path = BeEmpty.swift; sourceTree = ""; }; - OBJ_159 /* BeGreaterThan.swift */ = {isa = PBXFileReference; path = BeGreaterThan.swift; sourceTree = ""; }; - OBJ_160 /* BeGreaterThanOrEqualTo.swift */ = {isa = PBXFileReference; path = BeGreaterThanOrEqualTo.swift; sourceTree = ""; }; - OBJ_161 /* BeIdenticalTo.swift */ = {isa = PBXFileReference; path = BeIdenticalTo.swift; sourceTree = ""; }; - OBJ_162 /* BeLessThan.swift */ = {isa = PBXFileReference; path = BeLessThan.swift; sourceTree = ""; }; - OBJ_163 /* BeLessThanOrEqual.swift */ = {isa = PBXFileReference; path = BeLessThanOrEqual.swift; sourceTree = ""; }; - OBJ_164 /* BeLogical.swift */ = {isa = PBXFileReference; path = BeLogical.swift; sourceTree = ""; }; - OBJ_165 /* BeNil.swift */ = {isa = PBXFileReference; path = BeNil.swift; sourceTree = ""; }; - OBJ_166 /* BeVoid.swift */ = {isa = PBXFileReference; path = BeVoid.swift; sourceTree = ""; }; - OBJ_167 /* BeginWith.swift */ = {isa = PBXFileReference; path = BeginWith.swift; sourceTree = ""; }; - OBJ_168 /* Contain.swift */ = {isa = PBXFileReference; path = Contain.swift; sourceTree = ""; }; - OBJ_169 /* ContainElementSatisfying.swift */ = {isa = PBXFileReference; path = ContainElementSatisfying.swift; sourceTree = ""; }; - OBJ_17 /* ContainerComponent.swift */ = {isa = PBXFileReference; path = ContainerComponent.swift; sourceTree = ""; }; - OBJ_170 /* EndWith.swift */ = {isa = PBXFileReference; path = EndWith.swift; sourceTree = ""; }; - OBJ_171 /* Equal.swift */ = {isa = PBXFileReference; path = Equal.swift; sourceTree = ""; }; - OBJ_172 /* HaveCount.swift */ = {isa = PBXFileReference; path = HaveCount.swift; sourceTree = ""; }; - OBJ_173 /* Match.swift */ = {isa = PBXFileReference; path = Match.swift; sourceTree = ""; }; - OBJ_174 /* MatchError.swift */ = {isa = PBXFileReference; path = MatchError.swift; sourceTree = ""; }; - OBJ_175 /* MatcherFunc.swift */ = {isa = PBXFileReference; path = MatcherFunc.swift; sourceTree = ""; }; - OBJ_176 /* MatcherProtocols.swift */ = {isa = PBXFileReference; path = MatcherProtocols.swift; sourceTree = ""; }; - OBJ_177 /* PostNotification.swift */ = {isa = PBXFileReference; path = PostNotification.swift; sourceTree = ""; }; - OBJ_178 /* Predicate.swift */ = {isa = PBXFileReference; path = Predicate.swift; sourceTree = ""; }; - OBJ_179 /* RaisesException.swift */ = {isa = PBXFileReference; path = RaisesException.swift; sourceTree = ""; }; - OBJ_18 /* DefaultContainerComponent.swift */ = {isa = PBXFileReference; path = DefaultContainerComponent.swift; sourceTree = ""; }; - OBJ_180 /* SatisfyAllOf.swift */ = {isa = PBXFileReference; path = SatisfyAllOf.swift; sourceTree = ""; }; - OBJ_181 /* SatisfyAnyOf.swift */ = {isa = PBXFileReference; path = SatisfyAnyOf.swift; sourceTree = ""; }; - OBJ_182 /* ThrowAssertion.swift */ = {isa = PBXFileReference; path = ThrowAssertion.swift; sourceTree = ""; }; - OBJ_183 /* ThrowError.swift */ = {isa = PBXFileReference; path = ThrowError.swift; sourceTree = ""; }; - OBJ_184 /* ToSucceed.swift */ = {isa = PBXFileReference; path = ToSucceed.swift; sourceTree = ""; }; - OBJ_186 /* Await.swift */ = {isa = PBXFileReference; path = Await.swift; sourceTree = ""; }; - OBJ_187 /* Errors.swift */ = {isa = PBXFileReference; path = Errors.swift; sourceTree = ""; }; - OBJ_188 /* Functional.swift */ = {isa = PBXFileReference; path = Functional.swift; sourceTree = ""; }; - OBJ_189 /* SourceLocation.swift */ = {isa = PBXFileReference; path = SourceLocation.swift; sourceTree = ""; }; - OBJ_19 /* FactoryContainerComponent.swift */ = {isa = PBXFileReference; path = FactoryContainerComponent.swift; sourceTree = ""; }; - OBJ_190 /* Stringers.swift */ = {isa = PBXFileReference; path = Stringers.swift; sourceTree = ""; }; - OBJ_191 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; name = Package.swift; path = "/Users/kawoou/GitHub/Deli/.build/checkouts/Nimble.git-3003981226173163515/Package.swift"; sourceTree = ""; }; - OBJ_20 /* Container.swift */ = {isa = PBXFileReference; path = Container.swift; sourceTree = ""; }; - OBJ_22 /* ContainerError.swift */ = {isa = PBXFileReference; path = ContainerError.swift; sourceTree = ""; }; - OBJ_24 /* FactoryResolver.swift */ = {isa = PBXFileReference; path = FactoryResolver.swift; sourceTree = ""; }; - OBJ_25 /* Linker.swift */ = {isa = PBXFileReference; path = Linker.swift; sourceTree = ""; }; - OBJ_26 /* LoadPriority.swift */ = {isa = PBXFileReference; path = LoadPriority.swift; sourceTree = ""; }; - OBJ_27 /* ResolveRule.swift */ = {isa = PBXFileReference; path = ResolveRule.swift; sourceTree = ""; }; - OBJ_28 /* Resolver.swift */ = {isa = PBXFileReference; path = Resolver.swift; sourceTree = ""; }; - OBJ_29 /* Scope.swift */ = {isa = PBXFileReference; path = Scope.swift; sourceTree = ""; }; - OBJ_30 /* TypeKey.swift */ = {isa = PBXFileReference; path = TypeKey.swift; sourceTree = ""; }; - OBJ_31 /* Factory.swift */ = {isa = PBXFileReference; path = Factory.swift; sourceTree = ""; }; - OBJ_32 /* Inject.swift */ = {isa = PBXFileReference; path = Inject.swift; sourceTree = ""; }; - OBJ_33 /* LazyAutowired.swift */ = {isa = PBXFileReference; path = LazyAutowired.swift; sourceTree = ""; }; - OBJ_34 /* LazyAutowiredFactory.swift */ = {isa = PBXFileReference; path = LazyAutowiredFactory.swift; sourceTree = ""; }; - OBJ_35 /* ModuleFactory.swift */ = {isa = PBXFileReference; path = ModuleFactory.swift; sourceTree = ""; }; - OBJ_36 /* Payload.swift */ = {isa = PBXFileReference; path = Payload.swift; sourceTree = ""; }; - OBJ_40 /* AccountConfiguration.swift */ = {isa = PBXFileReference; path = AccountConfiguration.swift; sourceTree = ""; }; - OBJ_41 /* AccountService.swift */ = {isa = PBXFileReference; path = AccountService.swift; sourceTree = ""; }; - OBJ_42 /* AlwaysModel.swift */ = {isa = PBXFileReference; path = AlwaysModel.swift; sourceTree = ""; }; - OBJ_44 /* Book.swift */ = {isa = PBXFileReference; path = Book.swift; sourceTree = ""; }; - OBJ_45 /* COSMOS.swift */ = {isa = PBXFileReference; path = COSMOS.swift; sourceTree = ""; }; - OBJ_46 /* HarryPotter.swift */ = {isa = PBXFileReference; path = HarryPotter.swift; sourceTree = ""; }; - OBJ_47 /* Novel.swift */ = {isa = PBXFileReference; path = Novel.swift; sourceTree = ""; }; - OBJ_48 /* Science.swift */ = {isa = PBXFileReference; path = Science.swift; sourceTree = ""; }; - OBJ_49 /* TroisiemeHumanite.swift */ = {isa = PBXFileReference; path = TroisiemeHumanite.swift; sourceTree = ""; }; - OBJ_50 /* DeliFactory.swift */ = {isa = PBXFileReference; path = DeliFactory.swift; sourceTree = ""; }; - OBJ_51 /* FactoryTest.swift */ = {isa = PBXFileReference; path = FactoryTest.swift; sourceTree = ""; }; - OBJ_52 /* Friend.swift */ = {isa = PBXFileReference; path = Friend.swift; sourceTree = ""; }; - OBJ_53 /* FriendInfoViewModel.swift */ = {isa = PBXFileReference; path = FriendInfoViewModel.swift; sourceTree = ""; }; - OBJ_54 /* FriendListViewModel.swift */ = {isa = PBXFileReference; path = FriendListViewModel.swift; sourceTree = ""; }; - OBJ_55 /* FriendPayload.swift */ = {isa = PBXFileReference; path = FriendPayload.swift; sourceTree = ""; }; - OBJ_56 /* FriendService.swift */ = {isa = PBXFileReference; path = FriendService.swift; sourceTree = ""; }; - OBJ_57 /* LazyAutowiredQualifier.swift */ = {isa = PBXFileReference; path = LazyAutowiredQualifier.swift; sourceTree = ""; }; - OBJ_58 /* LibraryService.swift */ = {isa = PBXFileReference; path = LibraryService.swift; sourceTree = ""; }; - OBJ_59 /* MessageService.swift */ = {isa = PBXFileReference; path = MessageService.swift; sourceTree = ""; }; - OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; - OBJ_60 /* NetworkManager.swift */ = {isa = PBXFileReference; path = NetworkManager.swift; sourceTree = ""; }; - OBJ_62 /* InjectPropertyTest.swift */ = {isa = PBXFileReference; path = InjectPropertyTest.swift; sourceTree = ""; }; - OBJ_63 /* NetworkMethod.swift */ = {isa = PBXFileReference; path = NetworkMethod.swift; sourceTree = ""; }; - OBJ_64 /* NetworkProvider.swift */ = {isa = PBXFileReference; path = NetworkProvider.swift; sourceTree = ""; }; - OBJ_65 /* PropertyAutowired.swift */ = {isa = PBXFileReference; path = PropertyAutowired.swift; sourceTree = ""; }; - OBJ_66 /* PropertyAutowiredFactory.swift */ = {isa = PBXFileReference; path = PropertyAutowiredFactory.swift; sourceTree = ""; }; - OBJ_67 /* PropertyInject.swift */ = {isa = PBXFileReference; path = PropertyInject.swift; sourceTree = ""; }; - OBJ_68 /* PropertyLazyAutowired.swift */ = {isa = PBXFileReference; path = PropertyLazyAutowired.swift; sourceTree = ""; }; - OBJ_69 /* PropertyLazyAutowiredFactory.swift */ = {isa = PBXFileReference; path = PropertyLazyAutowiredFactory.swift; sourceTree = ""; }; - OBJ_70 /* ServerConfig.swift */ = {isa = PBXFileReference; path = ServerConfig.swift; sourceTree = ""; }; - OBJ_72 /* Robot.swift */ = {isa = PBXFileReference; path = Robot.swift; sourceTree = ""; }; - OBJ_73 /* RobotBody.swift */ = {isa = PBXFileReference; path = RobotBody.swift; sourceTree = ""; }; - OBJ_74 /* RobotFactory.swift */ = {isa = PBXFileReference; path = RobotFactory.swift; sourceTree = ""; }; - OBJ_75 /* RobotHead.swift */ = {isa = PBXFileReference; path = RobotHead.swift; sourceTree = ""; }; - OBJ_77 /* StructWithAutowired.swift */ = {isa = PBXFileReference; path = StructWithAutowired.swift; sourceTree = ""; }; - OBJ_78 /* StructWithAutowiredFactory.swift */ = {isa = PBXFileReference; path = StructWithAutowiredFactory.swift; sourceTree = ""; }; - OBJ_79 /* StructWithComponent.swift */ = {isa = PBXFileReference; path = StructWithComponent.swift; sourceTree = ""; }; - OBJ_80 /* StructWithLazyAutowired.swift */ = {isa = PBXFileReference; path = StructWithLazyAutowired.swift; sourceTree = ""; }; - OBJ_81 /* TestNotRegister.swift */ = {isa = PBXFileReference; path = TestNotRegister.swift; sourceTree = ""; }; - OBJ_82 /* TestPayload.swift */ = {isa = PBXFileReference; path = TestPayload.swift; sourceTree = ""; }; - OBJ_83 /* TestRegister.swift */ = {isa = PBXFileReference; path = TestRegister.swift; sourceTree = ""; }; - OBJ_84 /* TestService.swift */ = {isa = PBXFileReference; path = TestService.swift; sourceTree = ""; }; - OBJ_85 /* TestView1.swift */ = {isa = PBXFileReference; path = TestView1.swift; sourceTree = ""; }; - OBJ_86 /* TestView2.swift */ = {isa = PBXFileReference; path = TestView2.swift; sourceTree = ""; }; - OBJ_87 /* TestView3.swift */ = {isa = PBXFileReference; path = TestView3.swift; sourceTree = ""; }; - OBJ_88 /* TestViewModel.swift */ = {isa = PBXFileReference; path = TestViewModel.swift; sourceTree = ""; }; - OBJ_89 /* UnicodeTest.swift */ = {isa = PBXFileReference; path = UnicodeTest.swift; sourceTree = ""; }; - OBJ_9 /* Autowired.swift */ = {isa = PBXFileReference; path = Autowired.swift; sourceTree = ""; }; - OBJ_90 /* UserPayload.swift */ = {isa = PBXFileReference; path = UserPayload.swift; sourceTree = ""; }; - OBJ_91 /* UserViewModel.swift */ = {isa = PBXFileReference; path = UserViewModel.swift; sourceTree = ""; }; - OBJ_92 /* WeakViewModel.swift */ = {isa = PBXFileReference; path = WeakViewModel.swift; sourceTree = ""; }; - OBJ_93 /* DeliSpec.swift */ = {isa = PBXFileReference; path = DeliSpec.swift; sourceTree = ""; }; - OBJ_95 /* MockAccountService.swift */ = {isa = PBXFileReference; path = MockAccountService.swift; sourceTree = ""; }; - OBJ_96 /* MockBook.swift */ = {isa = PBXFileReference; path = MockBook.swift; sourceTree = ""; }; - OBJ_97 /* Supports */ = {isa = PBXFileReference; path = Supports; sourceTree = SOURCE_ROOT; }; - OBJ_98 /* Examples */ = {isa = PBXFileReference; path = Examples; sourceTree = SOURCE_ROOT; }; - OBJ_99 /* Binary */ = {isa = PBXFileReference; path = Binary; sourceTree = SOURCE_ROOT; }; - Quick::Quick::Product /* Quick.framework */ = {isa = PBXFileReference; path = Quick.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - Quick::QuickSpecBase::Product /* QuickSpecBase.framework */ = {isa = PBXFileReference; path = QuickSpecBase.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - OBJ_227 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - files = ( - ); - }; - OBJ_296 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - files = ( - OBJ_297 /* Nimble.framework in Frameworks */, - OBJ_298 /* Quick.framework in Frameworks */, - OBJ_299 /* QuickSpecBase.framework in Frameworks */, - OBJ_300 /* Deli.framework in Frameworks */, - ); - }; - OBJ_363 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - files = ( - ); - }; - OBJ_397 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - files = ( - OBJ_398 /* QuickSpecBase.framework in Frameworks */, - ); - }; - OBJ_413 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - files = ( - ); - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - OBJ_100 /* Dependencies */ = { - isa = PBXGroup; - children = ( - OBJ_101 /* Quick 1.3.2 */, - OBJ_134 /* Nimble 7.3.1 */, - ); - name = Dependencies; - path = ""; - sourceTree = ""; - }; - OBJ_101 /* Quick 1.3.2 */ = { - isa = PBXGroup; - children = ( - OBJ_102 /* Quick */, - OBJ_129 /* QuickSpecBase */, - OBJ_133 /* Package.swift */, - ); - name = "Quick 1.3.2"; - path = ""; - sourceTree = SOURCE_ROOT; - }; - OBJ_102 /* Quick */ = { - isa = PBXGroup; - children = ( - OBJ_103 /* Behavior.swift */, - OBJ_104 /* Callsite.swift */, - OBJ_105 /* Configuration */, - OBJ_108 /* DSL */, - OBJ_111 /* ErrorUtility.swift */, - OBJ_112 /* Example.swift */, - OBJ_113 /* ExampleGroup.swift */, - OBJ_114 /* ExampleMetadata.swift */, - OBJ_115 /* Filter.swift */, - OBJ_116 /* Hooks */, - OBJ_121 /* NSBundle+CurrentTestBundle.swift */, - OBJ_122 /* NSString+C99ExtendedIdentifier.swift */, - OBJ_123 /* QuickMain.swift */, - OBJ_124 /* QuickSelectedTestSuiteBuilder.swift */, - OBJ_125 /* QuickSpec.swift */, - OBJ_126 /* QuickTestSuite.swift */, - OBJ_127 /* URL+FileName.swift */, - OBJ_128 /* World.swift */, - ); - name = Quick; - path = ".build/checkouts/Quick.git--1364353377145539988/Sources/Quick"; - sourceTree = SOURCE_ROOT; - }; - OBJ_105 /* Configuration */ = { - isa = PBXGroup; - children = ( - OBJ_106 /* Configuration.swift */, - OBJ_107 /* QuickConfiguration.swift */, - ); - name = Configuration; - path = Configuration; - sourceTree = ""; - }; - OBJ_108 /* DSL */ = { - isa = PBXGroup; - children = ( - OBJ_109 /* DSL.swift */, - OBJ_110 /* World+DSL.swift */, - ); - name = DSL; - path = DSL; - sourceTree = ""; - }; - OBJ_116 /* Hooks */ = { - isa = PBXGroup; - children = ( - OBJ_117 /* Closures.swift */, - OBJ_118 /* ExampleHooks.swift */, - OBJ_119 /* HooksPhase.swift */, - OBJ_120 /* SuiteHooks.swift */, - ); - name = Hooks; - path = Hooks; - sourceTree = ""; - }; - OBJ_129 /* QuickSpecBase */ = { - isa = PBXGroup; - children = ( - OBJ_130 /* QuickSpecBase.m */, - OBJ_131 /* include */, - ); - name = QuickSpecBase; - path = ".build/checkouts/Quick.git--1364353377145539988/Sources/QuickSpecBase"; - sourceTree = SOURCE_ROOT; - }; - OBJ_131 /* include */ = { - isa = PBXGroup; - children = ( - OBJ_132 /* QuickSpecBase.h */, - ); - name = include; - path = include; - sourceTree = ""; - }; - OBJ_134 /* Nimble 7.3.1 */ = { - isa = PBXGroup; - children = ( - OBJ_135 /* Nimble */, - OBJ_191 /* Package.swift */, - ); - name = "Nimble 7.3.1"; - path = ""; - sourceTree = SOURCE_ROOT; - }; - OBJ_135 /* Nimble */ = { - isa = PBXGroup; - children = ( - OBJ_136 /* Adapters */, - OBJ_146 /* DSL+Wait.swift */, - OBJ_147 /* DSL.swift */, - OBJ_148 /* Expectation.swift */, - OBJ_149 /* ExpectationMessage.swift */, - OBJ_150 /* Expression.swift */, - OBJ_151 /* FailureMessage.swift */, - OBJ_152 /* Matchers */, - OBJ_185 /* Utils */, - ); - name = Nimble; - path = ".build/checkouts/Nimble.git-3003981226173163515/Sources/Nimble"; - sourceTree = SOURCE_ROOT; - }; - OBJ_136 /* Adapters */ = { - isa = PBXGroup; - children = ( - OBJ_137 /* AdapterProtocols.swift */, - OBJ_138 /* AssertionDispatcher.swift */, - OBJ_139 /* AssertionRecorder.swift */, - OBJ_140 /* NMBExpectation.swift */, - OBJ_141 /* NMBObjCMatcher.swift */, - OBJ_142 /* NimbleEnvironment.swift */, - OBJ_143 /* NimbleXCTestHandler.swift */, - OBJ_144 /* NonObjectiveC */, - ); - name = Adapters; - path = Adapters; - sourceTree = ""; - }; - OBJ_14 /* Core */ = { - isa = PBXGroup; - children = ( - OBJ_15 /* AppContext.swift */, - OBJ_16 /* Component */, - OBJ_20 /* Container.swift */, - OBJ_21 /* Error */, - OBJ_23 /* Type */, - ); - name = Core; - path = Core; - sourceTree = ""; - }; - OBJ_144 /* NonObjectiveC */ = { - isa = PBXGroup; - children = ( - OBJ_145 /* ExceptionCapture.swift */, - ); - name = NonObjectiveC; - path = NonObjectiveC; - sourceTree = ""; - }; - OBJ_152 /* Matchers */ = { - isa = PBXGroup; - children = ( - OBJ_153 /* AllPass.swift */, - OBJ_154 /* Async.swift */, - OBJ_155 /* BeAKindOf.swift */, - OBJ_156 /* BeAnInstanceOf.swift */, - OBJ_157 /* BeCloseTo.swift */, - OBJ_158 /* BeEmpty.swift */, - OBJ_159 /* BeGreaterThan.swift */, - OBJ_160 /* BeGreaterThanOrEqualTo.swift */, - OBJ_161 /* BeIdenticalTo.swift */, - OBJ_162 /* BeLessThan.swift */, - OBJ_163 /* BeLessThanOrEqual.swift */, - OBJ_164 /* BeLogical.swift */, - OBJ_165 /* BeNil.swift */, - OBJ_166 /* BeVoid.swift */, - OBJ_167 /* BeginWith.swift */, - OBJ_168 /* Contain.swift */, - OBJ_169 /* ContainElementSatisfying.swift */, - OBJ_170 /* EndWith.swift */, - OBJ_171 /* Equal.swift */, - OBJ_172 /* HaveCount.swift */, - OBJ_173 /* Match.swift */, - OBJ_174 /* MatchError.swift */, - OBJ_175 /* MatcherFunc.swift */, - OBJ_176 /* MatcherProtocols.swift */, - OBJ_177 /* PostNotification.swift */, - OBJ_178 /* Predicate.swift */, - OBJ_179 /* RaisesException.swift */, - OBJ_180 /* SatisfyAllOf.swift */, - OBJ_181 /* SatisfyAnyOf.swift */, - OBJ_182 /* ThrowAssertion.swift */, - OBJ_183 /* ThrowError.swift */, - OBJ_184 /* ToSucceed.swift */, - ); - name = Matchers; - path = Matchers; - sourceTree = ""; - }; - OBJ_16 /* Component */ = { - isa = PBXGroup; - children = ( - OBJ_17 /* ContainerComponent.swift */, - OBJ_18 /* DefaultContainerComponent.swift */, - OBJ_19 /* FactoryContainerComponent.swift */, - ); - name = Component; - path = Component; - sourceTree = ""; - }; - OBJ_185 /* Utils */ = { - isa = PBXGroup; - children = ( - OBJ_186 /* Await.swift */, - OBJ_187 /* Errors.swift */, - OBJ_188 /* Functional.swift */, - OBJ_189 /* SourceLocation.swift */, - OBJ_190 /* Stringers.swift */, - ); - name = Utils; - path = Utils; - sourceTree = ""; - }; - OBJ_192 /* Products */ = { - isa = PBXGroup; - children = ( - Deli::Deli::Product /* Deli.framework */, - Deli::DeliTests::Product /* DeliTests.xctest */, - Quick::Quick::Product /* Quick.framework */, - Nimble::Nimble::Product /* Nimble.framework */, - Quick::QuickSpecBase::Product /* QuickSpecBase.framework */, - ); - name = Products; - path = ""; - sourceTree = BUILT_PRODUCTS_DIR; - }; - OBJ_21 /* Error */ = { - isa = PBXGroup; - children = ( - OBJ_22 /* ContainerError.swift */, - ); - name = Error; - path = Error; - sourceTree = ""; - }; - OBJ_23 /* Type */ = { - isa = PBXGroup; - children = ( - OBJ_24 /* FactoryResolver.swift */, - OBJ_25 /* Linker.swift */, - OBJ_26 /* LoadPriority.swift */, - OBJ_27 /* ResolveRule.swift */, - OBJ_28 /* Resolver.swift */, - OBJ_29 /* Scope.swift */, - OBJ_30 /* TypeKey.swift */, - ); - name = Type; - path = Type; - sourceTree = ""; - }; - OBJ_37 /* Tests */ = { - isa = PBXGroup; - children = ( - OBJ_38 /* DeliTests */, - ); - name = Tests; - path = ""; - sourceTree = SOURCE_ROOT; - }; - OBJ_38 /* DeliTests */ = { - isa = PBXGroup; - children = ( - OBJ_39 /* DeliSample */, - OBJ_93 /* DeliSpec.swift */, - OBJ_94 /* Mock */, - ); - name = DeliTests; - path = Tests/DeliTests; - sourceTree = SOURCE_ROOT; - }; - OBJ_39 /* DeliSample */ = { - isa = PBXGroup; - children = ( - OBJ_40 /* AccountConfiguration.swift */, - OBJ_41 /* AccountService.swift */, - OBJ_42 /* AlwaysModel.swift */, - OBJ_43 /* Book */, - OBJ_50 /* DeliFactory.swift */, - OBJ_51 /* FactoryTest.swift */, - OBJ_52 /* Friend.swift */, - OBJ_53 /* FriendInfoViewModel.swift */, - OBJ_54 /* FriendListViewModel.swift */, - OBJ_55 /* FriendPayload.swift */, - OBJ_56 /* FriendService.swift */, - OBJ_57 /* LazyAutowiredQualifier.swift */, - OBJ_58 /* LibraryService.swift */, - OBJ_59 /* MessageService.swift */, - OBJ_60 /* NetworkManager.swift */, - OBJ_61 /* Property */, - OBJ_71 /* Robot */, - OBJ_76 /* Struct */, - OBJ_81 /* TestNotRegister.swift */, - OBJ_82 /* TestPayload.swift */, - OBJ_83 /* TestRegister.swift */, - OBJ_84 /* TestService.swift */, - OBJ_85 /* TestView1.swift */, - OBJ_86 /* TestView2.swift */, - OBJ_87 /* TestView3.swift */, - OBJ_88 /* TestViewModel.swift */, - OBJ_89 /* UnicodeTest.swift */, - OBJ_90 /* UserPayload.swift */, - OBJ_91 /* UserViewModel.swift */, - OBJ_92 /* WeakViewModel.swift */, - ); - name = DeliSample; - path = DeliSample; - sourceTree = ""; - }; - OBJ_43 /* Book */ = { - isa = PBXGroup; - children = ( - OBJ_44 /* Book.swift */, - OBJ_45 /* COSMOS.swift */, - OBJ_46 /* HarryPotter.swift */, - OBJ_47 /* Novel.swift */, - OBJ_48 /* Science.swift */, - OBJ_49 /* TroisiemeHumanite.swift */, - ); - name = Book; - path = Book; - sourceTree = ""; - }; - OBJ_5 = { - isa = PBXGroup; - children = ( - OBJ_6 /* Package.swift */, - OBJ_7 /* Sources */, - OBJ_37 /* Tests */, - OBJ_97 /* Supports */, - OBJ_98 /* Examples */, - OBJ_99 /* Binary */, - OBJ_100 /* Dependencies */, - OBJ_192 /* Products */, - ); - path = ""; - sourceTree = ""; - }; - OBJ_61 /* Property */ = { - isa = PBXGroup; - children = ( - OBJ_62 /* InjectPropertyTest.swift */, - OBJ_63 /* NetworkMethod.swift */, - OBJ_64 /* NetworkProvider.swift */, - OBJ_65 /* PropertyAutowired.swift */, - OBJ_66 /* PropertyAutowiredFactory.swift */, - OBJ_67 /* PropertyInject.swift */, - OBJ_68 /* PropertyLazyAutowired.swift */, - OBJ_69 /* PropertyLazyAutowiredFactory.swift */, - OBJ_70 /* ServerConfig.swift */, - ); - name = Property; - path = Property; - sourceTree = ""; - }; - OBJ_7 /* Sources */ = { - isa = PBXGroup; - children = ( - OBJ_8 /* Deli */, - ); - name = Sources; - path = ""; - sourceTree = SOURCE_ROOT; - }; - OBJ_71 /* Robot */ = { - isa = PBXGroup; - children = ( - OBJ_72 /* Robot.swift */, - OBJ_73 /* RobotBody.swift */, - OBJ_74 /* RobotFactory.swift */, - OBJ_75 /* RobotHead.swift */, - ); - name = Robot; - path = Robot; - sourceTree = ""; - }; - OBJ_76 /* Struct */ = { - isa = PBXGroup; - children = ( - OBJ_77 /* StructWithAutowired.swift */, - OBJ_78 /* StructWithAutowiredFactory.swift */, - OBJ_79 /* StructWithComponent.swift */, - OBJ_80 /* StructWithLazyAutowired.swift */, - ); - name = Struct; - path = Struct; - sourceTree = ""; - }; - OBJ_8 /* Deli */ = { - isa = PBXGroup; - children = ( - OBJ_9 /* Autowired.swift */, - OBJ_10 /* AutowiredFactory.swift */, - OBJ_11 /* Component.swift */, - OBJ_12 /* ConfigProperty.swift */, - OBJ_13 /* Configuration.swift */, - OBJ_14 /* Core */, - OBJ_31 /* Factory.swift */, - OBJ_32 /* Inject.swift */, - OBJ_33 /* LazyAutowired.swift */, - OBJ_34 /* LazyAutowiredFactory.swift */, - OBJ_35 /* ModuleFactory.swift */, - OBJ_36 /* Payload.swift */, - ); - name = Deli; - path = Sources/Deli; - sourceTree = SOURCE_ROOT; - }; - OBJ_94 /* Mock */ = { - isa = PBXGroup; - children = ( - OBJ_95 /* MockAccountService.swift */, - OBJ_96 /* MockBook.swift */, - ); - name = Mock; - path = Mock; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - OBJ_411 /* Headers */ = { - isa = PBXHeadersBuildPhase; - files = ( - OBJ_412 /* QuickSpecBase.h in Headers */, - ); - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - Deli::Deli /* Deli */ = { - isa = PBXNativeTarget; - buildConfigurationList = OBJ_199 /* Build configuration list for PBXNativeTarget "Deli" */; - buildPhases = ( - OBJ_202 /* Sources */, - OBJ_227 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Deli; - productName = Deli; - productReference = Deli::Deli::Product /* Deli.framework */; - productType = "com.apple.product-type.framework"; - }; - Deli::DeliTests /* DeliTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = OBJ_240 /* Build configuration list for PBXNativeTarget "DeliTests" */; - buildPhases = ( - OBJ_243 /* Sources */, - OBJ_296 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - OBJ_301 /* PBXTargetDependency */, - OBJ_303 /* PBXTargetDependency */, - OBJ_305 /* PBXTargetDependency */, - OBJ_307 /* PBXTargetDependency */, - ); - name = DeliTests; - productName = DeliTests; - productReference = Deli::DeliTests::Product /* DeliTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - Deli::SwiftPMPackageDescription /* DeliPackageDescription */ = { - isa = PBXNativeTarget; - buildConfigurationList = OBJ_229 /* Build configuration list for PBXNativeTarget "DeliPackageDescription" */; - buildPhases = ( - OBJ_232 /* Sources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = DeliPackageDescription; - productName = DeliPackageDescription; - productType = "com.apple.product-type.framework"; - }; - Nimble::Nimble /* Nimble */ = { - isa = PBXNativeTarget; - buildConfigurationList = OBJ_308 /* Build configuration list for PBXNativeTarget "Nimble" */; - buildPhases = ( - OBJ_311 /* Sources */, - OBJ_363 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Nimble; - productName = Nimble; - productReference = Nimble::Nimble::Product /* Nimble.framework */; - productType = "com.apple.product-type.framework"; - }; - Nimble::SwiftPMPackageDescription /* NimblePackageDescription */ = { - isa = PBXNativeTarget; - buildConfigurationList = OBJ_365 /* Build configuration list for PBXNativeTarget "NimblePackageDescription" */; - buildPhases = ( - OBJ_368 /* Sources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = NimblePackageDescription; - productName = NimblePackageDescription; - productType = "com.apple.product-type.framework"; - }; - Quick::Quick /* Quick */ = { - isa = PBXNativeTarget; - buildConfigurationList = OBJ_370 /* Build configuration list for PBXNativeTarget "Quick" */; - buildPhases = ( - OBJ_373 /* Sources */, - OBJ_397 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - OBJ_399 /* PBXTargetDependency */, - ); - name = Quick; - productName = Quick; - productReference = Quick::Quick::Product /* Quick.framework */; - productType = "com.apple.product-type.framework"; - }; - Quick::QuickSpecBase /* QuickSpecBase */ = { - isa = PBXNativeTarget; - buildConfigurationList = OBJ_406 /* Build configuration list for PBXNativeTarget "QuickSpecBase" */; - buildPhases = ( - OBJ_409 /* Sources */, - OBJ_411 /* Headers */, - OBJ_413 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = QuickSpecBase; - productName = QuickSpecBase; - productReference = Quick::QuickSpecBase::Product /* QuickSpecBase.framework */; - productType = "com.apple.product-type.framework"; - }; - Quick::SwiftPMPackageDescription /* QuickPackageDescription */ = { - isa = PBXNativeTarget; - buildConfigurationList = OBJ_401 /* Build configuration list for PBXNativeTarget "QuickPackageDescription" */; - buildPhases = ( - OBJ_404 /* Sources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = QuickPackageDescription; - productName = QuickPackageDescription; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - OBJ_1 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 9999; - }; - buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "Deli" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = OBJ_5; - productRefGroup = OBJ_192 /* Products */; - projectDirPath = .; - targets = ( - Deli::Deli /* Deli */, - Deli::SwiftPMPackageDescription /* DeliPackageDescription */, - Deli::DeliPackageTests::ProductTarget /* DeliPackageTests */, - Deli::DeliTests /* DeliTests */, - Nimble::Nimble /* Nimble */, - Nimble::SwiftPMPackageDescription /* NimblePackageDescription */, - Quick::Quick /* Quick */, - Quick::SwiftPMPackageDescription /* QuickPackageDescription */, - Quick::QuickSpecBase /* QuickSpecBase */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - OBJ_202 /* Sources */ = { - isa = PBXSourcesBuildPhase; - files = ( - OBJ_203 /* Autowired.swift in Sources */, - OBJ_204 /* AutowiredFactory.swift in Sources */, - OBJ_205 /* Component.swift in Sources */, - OBJ_206 /* ConfigProperty.swift in Sources */, - OBJ_207 /* Configuration.swift in Sources */, - OBJ_208 /* AppContext.swift in Sources */, - OBJ_209 /* ContainerComponent.swift in Sources */, - OBJ_210 /* DefaultContainerComponent.swift in Sources */, - OBJ_211 /* FactoryContainerComponent.swift in Sources */, - OBJ_212 /* Container.swift in Sources */, - OBJ_213 /* ContainerError.swift in Sources */, - OBJ_214 /* FactoryResolver.swift in Sources */, - OBJ_215 /* Linker.swift in Sources */, - OBJ_216 /* LoadPriority.swift in Sources */, - OBJ_217 /* ResolveRule.swift in Sources */, - OBJ_218 /* Resolver.swift in Sources */, - OBJ_219 /* Scope.swift in Sources */, - OBJ_220 /* TypeKey.swift in Sources */, - OBJ_221 /* Factory.swift in Sources */, - OBJ_222 /* Inject.swift in Sources */, - OBJ_223 /* LazyAutowired.swift in Sources */, - OBJ_224 /* LazyAutowiredFactory.swift in Sources */, - OBJ_225 /* ModuleFactory.swift in Sources */, - OBJ_226 /* Payload.swift in Sources */, - ); - }; - OBJ_232 /* Sources */ = { - isa = PBXSourcesBuildPhase; - files = ( - OBJ_233 /* Package.swift in Sources */, - ); - }; - OBJ_243 /* Sources */ = { - isa = PBXSourcesBuildPhase; - files = ( - OBJ_244 /* AccountConfiguration.swift in Sources */, - OBJ_245 /* AccountService.swift in Sources */, - OBJ_246 /* AlwaysModel.swift in Sources */, - OBJ_247 /* Book.swift in Sources */, - OBJ_248 /* COSMOS.swift in Sources */, - OBJ_249 /* HarryPotter.swift in Sources */, - OBJ_250 /* Novel.swift in Sources */, - OBJ_251 /* Science.swift in Sources */, - OBJ_252 /* TroisiemeHumanite.swift in Sources */, - OBJ_253 /* DeliFactory.swift in Sources */, - OBJ_254 /* FactoryTest.swift in Sources */, - OBJ_255 /* Friend.swift in Sources */, - OBJ_256 /* FriendInfoViewModel.swift in Sources */, - OBJ_257 /* FriendListViewModel.swift in Sources */, - OBJ_258 /* FriendPayload.swift in Sources */, - OBJ_259 /* FriendService.swift in Sources */, - OBJ_260 /* LazyAutowiredQualifier.swift in Sources */, - OBJ_261 /* LibraryService.swift in Sources */, - OBJ_262 /* MessageService.swift in Sources */, - OBJ_263 /* NetworkManager.swift in Sources */, - OBJ_264 /* InjectPropertyTest.swift in Sources */, - OBJ_265 /* NetworkMethod.swift in Sources */, - OBJ_266 /* NetworkProvider.swift in Sources */, - OBJ_267 /* PropertyAutowired.swift in Sources */, - OBJ_268 /* PropertyAutowiredFactory.swift in Sources */, - OBJ_269 /* PropertyInject.swift in Sources */, - OBJ_270 /* PropertyLazyAutowired.swift in Sources */, - OBJ_271 /* PropertyLazyAutowiredFactory.swift in Sources */, - OBJ_272 /* ServerConfig.swift in Sources */, - OBJ_273 /* Robot.swift in Sources */, - OBJ_274 /* RobotBody.swift in Sources */, - OBJ_275 /* RobotFactory.swift in Sources */, - OBJ_276 /* RobotHead.swift in Sources */, - OBJ_277 /* StructWithAutowired.swift in Sources */, - OBJ_278 /* StructWithAutowiredFactory.swift in Sources */, - OBJ_279 /* StructWithComponent.swift in Sources */, - OBJ_280 /* StructWithLazyAutowired.swift in Sources */, - OBJ_281 /* TestNotRegister.swift in Sources */, - OBJ_282 /* TestPayload.swift in Sources */, - OBJ_283 /* TestRegister.swift in Sources */, - OBJ_284 /* TestService.swift in Sources */, - OBJ_285 /* TestView1.swift in Sources */, - OBJ_286 /* TestView2.swift in Sources */, - OBJ_287 /* TestView3.swift in Sources */, - OBJ_288 /* TestViewModel.swift in Sources */, - OBJ_289 /* UnicodeTest.swift in Sources */, - OBJ_290 /* UserPayload.swift in Sources */, - OBJ_291 /* UserViewModel.swift in Sources */, - OBJ_292 /* WeakViewModel.swift in Sources */, - OBJ_293 /* DeliSpec.swift in Sources */, - OBJ_294 /* MockAccountService.swift in Sources */, - OBJ_295 /* MockBook.swift in Sources */, - ); - }; - OBJ_311 /* Sources */ = { - isa = PBXSourcesBuildPhase; - files = ( - OBJ_312 /* AdapterProtocols.swift in Sources */, - OBJ_313 /* AssertionDispatcher.swift in Sources */, - OBJ_314 /* AssertionRecorder.swift in Sources */, - OBJ_315 /* NMBExpectation.swift in Sources */, - OBJ_316 /* NMBObjCMatcher.swift in Sources */, - OBJ_317 /* NimbleEnvironment.swift in Sources */, - OBJ_318 /* NimbleXCTestHandler.swift in Sources */, - OBJ_319 /* ExceptionCapture.swift in Sources */, - OBJ_320 /* DSL+Wait.swift in Sources */, - OBJ_321 /* DSL.swift in Sources */, - OBJ_322 /* Expectation.swift in Sources */, - OBJ_323 /* ExpectationMessage.swift in Sources */, - OBJ_324 /* Expression.swift in Sources */, - OBJ_325 /* FailureMessage.swift in Sources */, - OBJ_326 /* AllPass.swift in Sources */, - OBJ_327 /* Async.swift in Sources */, - OBJ_328 /* BeAKindOf.swift in Sources */, - OBJ_329 /* BeAnInstanceOf.swift in Sources */, - OBJ_330 /* BeCloseTo.swift in Sources */, - OBJ_331 /* BeEmpty.swift in Sources */, - OBJ_332 /* BeGreaterThan.swift in Sources */, - OBJ_333 /* BeGreaterThanOrEqualTo.swift in Sources */, - OBJ_334 /* BeIdenticalTo.swift in Sources */, - OBJ_335 /* BeLessThan.swift in Sources */, - OBJ_336 /* BeLessThanOrEqual.swift in Sources */, - OBJ_337 /* BeLogical.swift in Sources */, - OBJ_338 /* BeNil.swift in Sources */, - OBJ_339 /* BeVoid.swift in Sources */, - OBJ_340 /* BeginWith.swift in Sources */, - OBJ_341 /* Contain.swift in Sources */, - OBJ_342 /* ContainElementSatisfying.swift in Sources */, - OBJ_343 /* EndWith.swift in Sources */, - OBJ_344 /* Equal.swift in Sources */, - OBJ_345 /* HaveCount.swift in Sources */, - OBJ_346 /* Match.swift in Sources */, - OBJ_347 /* MatchError.swift in Sources */, - OBJ_348 /* MatcherFunc.swift in Sources */, - OBJ_349 /* MatcherProtocols.swift in Sources */, - OBJ_350 /* PostNotification.swift in Sources */, - OBJ_351 /* Predicate.swift in Sources */, - OBJ_352 /* RaisesException.swift in Sources */, - OBJ_353 /* SatisfyAllOf.swift in Sources */, - OBJ_354 /* SatisfyAnyOf.swift in Sources */, - OBJ_355 /* ThrowAssertion.swift in Sources */, - OBJ_356 /* ThrowError.swift in Sources */, - OBJ_357 /* ToSucceed.swift in Sources */, - OBJ_358 /* Await.swift in Sources */, - OBJ_359 /* Errors.swift in Sources */, - OBJ_360 /* Functional.swift in Sources */, - OBJ_361 /* SourceLocation.swift in Sources */, - OBJ_362 /* Stringers.swift in Sources */, - ); - }; - OBJ_368 /* Sources */ = { - isa = PBXSourcesBuildPhase; - files = ( - OBJ_369 /* Package.swift in Sources */, - ); - }; - OBJ_373 /* Sources */ = { - isa = PBXSourcesBuildPhase; - files = ( - OBJ_374 /* Behavior.swift in Sources */, - OBJ_375 /* Callsite.swift in Sources */, - OBJ_376 /* Configuration.swift in Sources */, - OBJ_377 /* QuickConfiguration.swift in Sources */, - OBJ_378 /* DSL.swift in Sources */, - OBJ_379 /* World+DSL.swift in Sources */, - OBJ_380 /* ErrorUtility.swift in Sources */, - OBJ_381 /* Example.swift in Sources */, - OBJ_382 /* ExampleGroup.swift in Sources */, - OBJ_383 /* ExampleMetadata.swift in Sources */, - OBJ_384 /* Filter.swift in Sources */, - OBJ_385 /* Closures.swift in Sources */, - OBJ_386 /* ExampleHooks.swift in Sources */, - OBJ_387 /* HooksPhase.swift in Sources */, - OBJ_388 /* SuiteHooks.swift in Sources */, - OBJ_389 /* NSBundle+CurrentTestBundle.swift in Sources */, - OBJ_390 /* NSString+C99ExtendedIdentifier.swift in Sources */, - OBJ_391 /* QuickMain.swift in Sources */, - OBJ_392 /* QuickSelectedTestSuiteBuilder.swift in Sources */, - OBJ_393 /* QuickSpec.swift in Sources */, - OBJ_394 /* QuickTestSuite.swift in Sources */, - OBJ_395 /* URL+FileName.swift in Sources */, - OBJ_396 /* World.swift in Sources */, - ); - }; - OBJ_404 /* Sources */ = { - isa = PBXSourcesBuildPhase; - files = ( - OBJ_405 /* Package.swift in Sources */, - ); - }; - OBJ_409 /* Sources */ = { - isa = PBXSourcesBuildPhase; - files = ( - OBJ_410 /* QuickSpecBase.m in Sources */, - ); - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - OBJ_238 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = Deli::DeliTests /* DeliTests */; - }; - OBJ_301 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = Nimble::Nimble /* Nimble */; - }; - OBJ_303 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = Quick::Quick /* Quick */; - }; - OBJ_305 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = Quick::QuickSpecBase /* QuickSpecBase */; - }; - OBJ_307 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = Deli::Deli /* Deli */; - }; - OBJ_399 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = Quick::QuickSpecBase /* QuickSpecBase */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - OBJ_200 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - HEADER_SEARCH_PATHS = "$(inherited)"; - INFOPLIST_FILE = Deli.xcodeproj/Deli_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; - OTHER_CFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - PRODUCT_BUNDLE_IDENTIFIER = Deli; - PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; - SWIFT_VERSION = 4.2; - TARGET_NAME = Deli; - }; - name = Debug; - }; - OBJ_201 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - HEADER_SEARCH_PATHS = "$(inherited)"; - INFOPLIST_FILE = Deli.xcodeproj/Deli_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; - OTHER_CFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - PRODUCT_BUNDLE_IDENTIFIER = Deli; - PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; - SWIFT_VERSION = 4.2; - TARGET_NAME = Deli; - }; - name = Release; - }; - OBJ_230 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - LD = /usr/bin/true; - OTHER_SWIFT_FLAGS = "-swift-version 4.2 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"; - SWIFT_VERSION = 4.2; - }; - name = Debug; - }; - OBJ_231 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - LD = /usr/bin/true; - OTHER_SWIFT_FLAGS = "-swift-version 4.2 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"; - SWIFT_VERSION = 4.2; - }; - name = Release; - }; - OBJ_236 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Debug; - }; - OBJ_237 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Release; - }; - OBJ_241 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/.build/checkouts/Quick.git--1364353377145539988/Sources/QuickSpecBase/include", - ); - INFOPLIST_FILE = Deli.xcodeproj/DeliTests_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/../Frameworks @loader_path/Frameworks"; - OTHER_CFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; - SWIFT_VERSION = 4.2; - TARGET_NAME = DeliTests; - }; - name = Debug; - }; - OBJ_242 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/.build/checkouts/Quick.git--1364353377145539988/Sources/QuickSpecBase/include", - ); - INFOPLIST_FILE = Deli.xcodeproj/DeliTests_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/../Frameworks @loader_path/Frameworks"; - OTHER_CFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; - SWIFT_VERSION = 4.2; - TARGET_NAME = DeliTests; - }; - name = Release; - }; - OBJ_3 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_OBJC_ARC = YES; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_NS_ASSERTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - MACOSX_DEPLOYMENT_TARGET = 10.10; - ONLY_ACTIVE_ARCH = YES; - OTHER_SWIFT_FLAGS = "-DXcode"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "SWIFT_PACKAGE DEBUG"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - USE_HEADERMAP = NO; - }; - name = Debug; - }; - OBJ_309 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - HEADER_SEARCH_PATHS = "$(inherited)"; - INFOPLIST_FILE = Deli.xcodeproj/Nimble_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; - OTHER_CFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited) -suppress-warnings"; - PRODUCT_BUNDLE_IDENTIFIER = Nimble; - PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; - SWIFT_VERSION = 4.0; - TARGET_NAME = Nimble; - }; - name = Debug; - }; - OBJ_310 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - HEADER_SEARCH_PATHS = "$(inherited)"; - INFOPLIST_FILE = Deli.xcodeproj/Nimble_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; - OTHER_CFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited) -suppress-warnings"; - PRODUCT_BUNDLE_IDENTIFIER = Nimble; - PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; - SWIFT_VERSION = 4.0; - TARGET_NAME = Nimble; - }; - name = Release; - }; - OBJ_366 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - LD = /usr/bin/true; - OTHER_SWIFT_FLAGS = "-swift-version 4 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - OBJ_367 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - LD = /usr/bin/true; - OTHER_SWIFT_FLAGS = "-swift-version 4 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"; - SWIFT_VERSION = 4.0; - }; - name = Release; - }; - OBJ_371 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/.build/checkouts/Quick.git--1364353377145539988/Sources/QuickSpecBase/include", - ); - INFOPLIST_FILE = Deli.xcodeproj/Quick_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; - OTHER_CFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - PRODUCT_BUNDLE_IDENTIFIER = Quick; - PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; - SWIFT_VERSION = 3.0; - TARGET_NAME = Quick; - }; - name = Debug; - }; - OBJ_372 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/.build/checkouts/Quick.git--1364353377145539988/Sources/QuickSpecBase/include", - ); - INFOPLIST_FILE = Deli.xcodeproj/Quick_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; - OTHER_CFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - PRODUCT_BUNDLE_IDENTIFIER = Quick; - PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; - SWIFT_VERSION = 3.0; - TARGET_NAME = Quick; - }; - name = Release; - }; - OBJ_4 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_OBJC_ARC = YES; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_OPTIMIZATION_LEVEL = s; - MACOSX_DEPLOYMENT_TARGET = 10.10; - OTHER_SWIFT_FLAGS = "-DXcode"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - USE_HEADERMAP = NO; - }; - name = Release; - }; - OBJ_402 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - LD = /usr/bin/true; - OTHER_SWIFT_FLAGS = "-swift-version 4 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - OBJ_403 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - LD = /usr/bin/true; - OTHER_SWIFT_FLAGS = "-swift-version 4 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"; - SWIFT_VERSION = 4.0; - }; - name = Release; - }; - OBJ_407 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - DEFINES_MODULE = YES; - ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/.build/checkouts/Quick.git--1364353377145539988/Sources/QuickSpecBase/include", - ); - INFOPLIST_FILE = Deli.xcodeproj/QuickSpecBase_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; - OTHER_CFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - PRODUCT_BUNDLE_IDENTIFIER = QuickSpecBase; - PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; - TARGET_NAME = QuickSpecBase; - }; - name = Debug; - }; - OBJ_408 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - DEFINES_MODULE = YES; - ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/.build/checkouts/Quick.git--1364353377145539988/Sources/QuickSpecBase/include", - ); - INFOPLIST_FILE = Deli.xcodeproj/QuickSpecBase_Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; - OTHER_CFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - PRODUCT_BUNDLE_IDENTIFIER = QuickSpecBase; - PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; - TARGET_NAME = QuickSpecBase; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - OBJ_199 /* Build configuration list for PBXNativeTarget "Deli" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - OBJ_200 /* Debug */, - OBJ_201 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - OBJ_2 /* Build configuration list for PBXProject "Deli" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - OBJ_3 /* Debug */, - OBJ_4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - OBJ_229 /* Build configuration list for PBXNativeTarget "DeliPackageDescription" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - OBJ_230 /* Debug */, - OBJ_231 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - OBJ_235 /* Build configuration list for PBXAggregateTarget "DeliPackageTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - OBJ_236 /* Debug */, - OBJ_237 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - OBJ_240 /* Build configuration list for PBXNativeTarget "DeliTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - OBJ_241 /* Debug */, - OBJ_242 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - OBJ_308 /* Build configuration list for PBXNativeTarget "Nimble" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - OBJ_309 /* Debug */, - OBJ_310 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - OBJ_365 /* Build configuration list for PBXNativeTarget "NimblePackageDescription" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - OBJ_366 /* Debug */, - OBJ_367 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - OBJ_370 /* Build configuration list for PBXNativeTarget "Quick" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - OBJ_371 /* Debug */, - OBJ_372 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - OBJ_401 /* Build configuration list for PBXNativeTarget "QuickPackageDescription" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - OBJ_402 /* Debug */, - OBJ_403 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - OBJ_406 /* Build configuration list for PBXNativeTarget "QuickSpecBase" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - OBJ_407 /* Debug */, - OBJ_408 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = OBJ_1 /* Project object */; + archiveVersion = "1"; + objectVersion = "46"; + objects = { + "Deli::Deli" = { + isa = "PBXNativeTarget"; + buildConfigurationList = "OBJ_219"; + buildPhases = ( + "OBJ_222", + "OBJ_250" + ); + dependencies = ( + ); + name = "Deli"; + productName = "Deli"; + productReference = "Deli::Deli::Product"; + productType = "com.apple.product-type.framework"; + }; + "Deli::Deli::Product" = { + isa = "PBXFileReference"; + path = "Deli.framework"; + sourceTree = "BUILT_PRODUCTS_DIR"; + }; + "Deli::DeliPackageTests::ProductTarget" = { + isa = "PBXAggregateTarget"; + buildConfigurationList = "OBJ_258"; + buildPhases = ( + ); + dependencies = ( + "OBJ_261" + ); + name = "DeliPackageTests"; + productName = "DeliPackageTests"; + }; + "Deli::DeliTests" = { + isa = "PBXNativeTarget"; + buildConfigurationList = "OBJ_263"; + buildPhases = ( + "OBJ_266", + "OBJ_325" + ); + dependencies = ( + "OBJ_330", + "OBJ_332", + "OBJ_334", + "OBJ_336" + ); + name = "DeliTests"; + productName = "DeliTests"; + productReference = "Deli::DeliTests::Product"; + productType = "com.apple.product-type.bundle.unit-test"; + }; + "Deli::DeliTests::Product" = { + isa = "PBXFileReference"; + path = "DeliTests.xctest"; + sourceTree = "BUILT_PRODUCTS_DIR"; + }; + "Deli::SwiftPMPackageDescription" = { + isa = "PBXNativeTarget"; + buildConfigurationList = "OBJ_252"; + buildPhases = ( + "OBJ_255" + ); + dependencies = ( + ); + name = "DeliPackageDescription"; + productName = "DeliPackageDescription"; + productType = "com.apple.product-type.framework"; + }; + "Nimble::Nimble" = { + isa = "PBXNativeTarget"; + buildConfigurationList = "OBJ_337"; + buildPhases = ( + "OBJ_340", + "OBJ_393" + ); + dependencies = ( + ); + name = "Nimble"; + productName = "Nimble"; + productReference = "Nimble::Nimble::Product"; + productType = "com.apple.product-type.framework"; + }; + "Nimble::Nimble::Product" = { + isa = "PBXFileReference"; + path = "Nimble.framework"; + sourceTree = "BUILT_PRODUCTS_DIR"; + }; + "Nimble::SwiftPMPackageDescription" = { + isa = "PBXNativeTarget"; + buildConfigurationList = "OBJ_395"; + buildPhases = ( + "OBJ_398" + ); + dependencies = ( + ); + name = "NimblePackageDescription"; + productName = "NimblePackageDescription"; + productType = "com.apple.product-type.framework"; + }; + "OBJ_1" = { + isa = "PBXProject"; + attributes = { + LastSwiftMigration = "9999"; + LastUpgradeCheck = "9999"; + }; + buildConfigurationList = "OBJ_2"; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = "en"; + hasScannedForEncodings = "0"; + knownRegions = ( + "en" + ); + mainGroup = "OBJ_5"; + productRefGroup = "OBJ_200"; + projectDirPath = "."; + targets = ( + "Deli::Deli", + "Deli::SwiftPMPackageDescription", + "Deli::DeliPackageTests::ProductTarget", + "Deli::DeliTests", + "Nimble::Nimble", + "Nimble::SwiftPMPackageDescription", + "Quick::Quick", + "Quick::SwiftPMPackageDescription", + "Quick::QuickSpecBase" + ); + }; + "OBJ_10" = { + isa = "PBXFileReference"; + path = "AutowiredFactory.swift"; + sourceTree = ""; + }; + "OBJ_100" = { + isa = "PBXFileReference"; + path = "UserPayload.swift"; + sourceTree = ""; + }; + "OBJ_101" = { + isa = "PBXFileReference"; + path = "UserViewModel.swift"; + sourceTree = ""; + }; + "OBJ_102" = { + isa = "PBXFileReference"; + path = "WeakViewModel.swift"; + sourceTree = ""; + }; + "OBJ_103" = { + isa = "PBXFileReference"; + path = "DeliSpec.swift"; + sourceTree = ""; + }; + "OBJ_104" = { + isa = "PBXGroup"; + children = ( + "OBJ_105", + "OBJ_106" + ); + name = "Mock"; + path = "Mock"; + sourceTree = ""; + }; + "OBJ_105" = { + isa = "PBXFileReference"; + path = "MockAccountService.swift"; + sourceTree = ""; + }; + "OBJ_106" = { + isa = "PBXFileReference"; + path = "MockBook.swift"; + sourceTree = ""; + }; + "OBJ_107" = { + isa = "PBXGroup"; + children = ( + "OBJ_108", + "OBJ_141" + ); + name = "Dependencies"; + path = ""; + sourceTree = ""; + }; + "OBJ_108" = { + isa = "PBXGroup"; + children = ( + "OBJ_109", + "OBJ_136", + "OBJ_140" + ); + name = "Quick 2.2.0"; + path = ""; + sourceTree = "SOURCE_ROOT"; + }; + "OBJ_109" = { + isa = "PBXGroup"; + children = ( + "OBJ_110", + "OBJ_111", + "OBJ_112", + "OBJ_115", + "OBJ_118", + "OBJ_119", + "OBJ_120", + "OBJ_121", + "OBJ_122", + "OBJ_123", + "OBJ_128", + "OBJ_129", + "OBJ_130", + "OBJ_131", + "OBJ_132", + "OBJ_133", + "OBJ_134", + "OBJ_135" + ); + name = "Quick"; + path = ".build/checkouts/Quick/Sources/Quick"; + sourceTree = "SOURCE_ROOT"; + }; + "OBJ_11" = { + isa = "PBXFileReference"; + path = "Component.swift"; + sourceTree = ""; + }; + "OBJ_110" = { + isa = "PBXFileReference"; + path = "Behavior.swift"; + sourceTree = ""; + }; + "OBJ_111" = { + isa = "PBXFileReference"; + path = "Callsite.swift"; + sourceTree = ""; + }; + "OBJ_112" = { + isa = "PBXGroup"; + children = ( + "OBJ_113", + "OBJ_114" + ); + name = "Configuration"; + path = "Configuration"; + sourceTree = ""; + }; + "OBJ_113" = { + isa = "PBXFileReference"; + path = "Configuration.swift"; + sourceTree = ""; + }; + "OBJ_114" = { + isa = "PBXFileReference"; + path = "QuickConfiguration.swift"; + sourceTree = ""; + }; + "OBJ_115" = { + isa = "PBXGroup"; + children = ( + "OBJ_116", + "OBJ_117" + ); + name = "DSL"; + path = "DSL"; + sourceTree = ""; + }; + "OBJ_116" = { + isa = "PBXFileReference"; + path = "DSL.swift"; + sourceTree = ""; + }; + "OBJ_117" = { + isa = "PBXFileReference"; + path = "World+DSL.swift"; + sourceTree = ""; + }; + "OBJ_118" = { + isa = "PBXFileReference"; + path = "ErrorUtility.swift"; + sourceTree = ""; + }; + "OBJ_119" = { + isa = "PBXFileReference"; + path = "Example.swift"; + sourceTree = ""; + }; + "OBJ_12" = { + isa = "PBXFileReference"; + path = "ConfigProperty.swift"; + sourceTree = ""; + }; + "OBJ_120" = { + isa = "PBXFileReference"; + path = "ExampleGroup.swift"; + sourceTree = ""; + }; + "OBJ_121" = { + isa = "PBXFileReference"; + path = "ExampleMetadata.swift"; + sourceTree = ""; + }; + "OBJ_122" = { + isa = "PBXFileReference"; + path = "Filter.swift"; + sourceTree = ""; + }; + "OBJ_123" = { + isa = "PBXGroup"; + children = ( + "OBJ_124", + "OBJ_125", + "OBJ_126", + "OBJ_127" + ); + name = "Hooks"; + path = "Hooks"; + sourceTree = ""; + }; + "OBJ_124" = { + isa = "PBXFileReference"; + path = "Closures.swift"; + sourceTree = ""; + }; + "OBJ_125" = { + isa = "PBXFileReference"; + path = "ExampleHooks.swift"; + sourceTree = ""; + }; + "OBJ_126" = { + isa = "PBXFileReference"; + path = "HooksPhase.swift"; + sourceTree = ""; + }; + "OBJ_127" = { + isa = "PBXFileReference"; + path = "SuiteHooks.swift"; + sourceTree = ""; + }; + "OBJ_128" = { + isa = "PBXFileReference"; + path = "NSBundle+CurrentTestBundle.swift"; + sourceTree = ""; + }; + "OBJ_129" = { + isa = "PBXFileReference"; + path = "QuickMain.swift"; + sourceTree = ""; + }; + "OBJ_13" = { + isa = "PBXFileReference"; + path = "Configuration.swift"; + sourceTree = ""; + }; + "OBJ_130" = { + isa = "PBXFileReference"; + path = "QuickSelectedTestSuiteBuilder.swift"; + sourceTree = ""; + }; + "OBJ_131" = { + isa = "PBXFileReference"; + path = "QuickSpec.swift"; + sourceTree = ""; + }; + "OBJ_132" = { + isa = "PBXFileReference"; + path = "QuickTestSuite.swift"; + sourceTree = ""; + }; + "OBJ_133" = { + isa = "PBXFileReference"; + path = "String+C99ExtendedIdentifier.swift"; + sourceTree = ""; + }; + "OBJ_134" = { + isa = "PBXFileReference"; + path = "URL+FileName.swift"; + sourceTree = ""; + }; + "OBJ_135" = { + isa = "PBXFileReference"; + path = "World.swift"; + sourceTree = ""; + }; + "OBJ_136" = { + isa = "PBXGroup"; + children = ( + "OBJ_137", + "OBJ_138" + ); + name = "QuickSpecBase"; + path = ".build/checkouts/Quick/Sources/QuickSpecBase"; + sourceTree = "SOURCE_ROOT"; + }; + "OBJ_137" = { + isa = "PBXFileReference"; + path = "QuickSpecBase.m"; + sourceTree = ""; + }; + "OBJ_138" = { + isa = "PBXGroup"; + children = ( + "OBJ_139" + ); + name = "include"; + path = "include"; + sourceTree = ""; + }; + "OBJ_139" = { + isa = "PBXFileReference"; + path = "QuickSpecBase.h"; + sourceTree = ""; + }; + "OBJ_14" = { + isa = "PBXGroup"; + children = ( + "OBJ_15", + "OBJ_16", + "OBJ_20", + "OBJ_21", + "OBJ_23" + ); + name = "Core"; + path = "Core"; + sourceTree = ""; + }; + "OBJ_140" = { + isa = "PBXFileReference"; + explicitFileType = "sourcecode.swift"; + name = "Package.swift"; + path = "/Users/kawoou/GitHub/Deli/.build/checkouts/Quick/Package.swift"; + sourceTree = ""; + }; + "OBJ_141" = { + isa = "PBXGroup"; + children = ( + "OBJ_142", + "OBJ_199" + ); + name = "Nimble 8.0.2"; + path = ""; + sourceTree = "SOURCE_ROOT"; + }; + "OBJ_142" = { + isa = "PBXGroup"; + children = ( + "OBJ_143", + "OBJ_153", + "OBJ_154", + "OBJ_155", + "OBJ_156", + "OBJ_157", + "OBJ_158", + "OBJ_159", + "OBJ_193" + ); + name = "Nimble"; + path = ".build/checkouts/Nimble/Sources/Nimble"; + sourceTree = "SOURCE_ROOT"; + }; + "OBJ_143" = { + isa = "PBXGroup"; + children = ( + "OBJ_144", + "OBJ_145", + "OBJ_146", + "OBJ_147", + "OBJ_148", + "OBJ_149", + "OBJ_150", + "OBJ_151" + ); + name = "Adapters"; + path = "Adapters"; + sourceTree = ""; + }; + "OBJ_144" = { + isa = "PBXFileReference"; + path = "AdapterProtocols.swift"; + sourceTree = ""; + }; + "OBJ_145" = { + isa = "PBXFileReference"; + path = "AssertionDispatcher.swift"; + sourceTree = ""; + }; + "OBJ_146" = { + isa = "PBXFileReference"; + path = "AssertionRecorder.swift"; + sourceTree = ""; + }; + "OBJ_147" = { + isa = "PBXFileReference"; + path = "NMBExpectation.swift"; + sourceTree = ""; + }; + "OBJ_148" = { + isa = "PBXFileReference"; + path = "NMBObjCMatcher.swift"; + sourceTree = ""; + }; + "OBJ_149" = { + isa = "PBXFileReference"; + path = "NimbleEnvironment.swift"; + sourceTree = ""; + }; + "OBJ_15" = { + isa = "PBXFileReference"; + path = "AppContext.swift"; + sourceTree = ""; + }; + "OBJ_150" = { + isa = "PBXFileReference"; + path = "NimbleXCTestHandler.swift"; + sourceTree = ""; + }; + "OBJ_151" = { + isa = "PBXGroup"; + children = ( + "OBJ_152" + ); + name = "NonObjectiveC"; + path = "NonObjectiveC"; + sourceTree = ""; + }; + "OBJ_152" = { + isa = "PBXFileReference"; + path = "ExceptionCapture.swift"; + sourceTree = ""; + }; + "OBJ_153" = { + isa = "PBXFileReference"; + path = "DSL+Wait.swift"; + sourceTree = ""; + }; + "OBJ_154" = { + isa = "PBXFileReference"; + path = "DSL.swift"; + sourceTree = ""; + }; + "OBJ_155" = { + isa = "PBXFileReference"; + path = "Expectation.swift"; + sourceTree = ""; + }; + "OBJ_156" = { + isa = "PBXFileReference"; + path = "ExpectationMessage.swift"; + sourceTree = ""; + }; + "OBJ_157" = { + isa = "PBXFileReference"; + path = "Expression.swift"; + sourceTree = ""; + }; + "OBJ_158" = { + isa = "PBXFileReference"; + path = "FailureMessage.swift"; + sourceTree = ""; + }; + "OBJ_159" = { + isa = "PBXGroup"; + children = ( + "OBJ_160", + "OBJ_161", + "OBJ_162", + "OBJ_163", + "OBJ_164", + "OBJ_165", + "OBJ_166", + "OBJ_167", + "OBJ_168", + "OBJ_169", + "OBJ_170", + "OBJ_171", + "OBJ_172", + "OBJ_173", + "OBJ_174", + "OBJ_175", + "OBJ_176", + "OBJ_177", + "OBJ_178", + "OBJ_179", + "OBJ_180", + "OBJ_181", + "OBJ_182", + "OBJ_183", + "OBJ_184", + "OBJ_185", + "OBJ_186", + "OBJ_187", + "OBJ_188", + "OBJ_189", + "OBJ_190", + "OBJ_191", + "OBJ_192" + ); + name = "Matchers"; + path = "Matchers"; + sourceTree = ""; + }; + "OBJ_16" = { + isa = "PBXGroup"; + children = ( + "OBJ_17", + "OBJ_18", + "OBJ_19" + ); + name = "Component"; + path = "Component"; + sourceTree = ""; + }; + "OBJ_160" = { + isa = "PBXFileReference"; + path = "AllPass.swift"; + sourceTree = ""; + }; + "OBJ_161" = { + isa = "PBXFileReference"; + path = "Async.swift"; + sourceTree = ""; + }; + "OBJ_162" = { + isa = "PBXFileReference"; + path = "BeAKindOf.swift"; + sourceTree = ""; + }; + "OBJ_163" = { + isa = "PBXFileReference"; + path = "BeAnInstanceOf.swift"; + sourceTree = ""; + }; + "OBJ_164" = { + isa = "PBXFileReference"; + path = "BeCloseTo.swift"; + sourceTree = ""; + }; + "OBJ_165" = { + isa = "PBXFileReference"; + path = "BeEmpty.swift"; + sourceTree = ""; + }; + "OBJ_166" = { + isa = "PBXFileReference"; + path = "BeGreaterThan.swift"; + sourceTree = ""; + }; + "OBJ_167" = { + isa = "PBXFileReference"; + path = "BeGreaterThanOrEqualTo.swift"; + sourceTree = ""; + }; + "OBJ_168" = { + isa = "PBXFileReference"; + path = "BeIdenticalTo.swift"; + sourceTree = ""; + }; + "OBJ_169" = { + isa = "PBXFileReference"; + path = "BeLessThan.swift"; + sourceTree = ""; + }; + "OBJ_17" = { + isa = "PBXFileReference"; + path = "ContainerComponent.swift"; + sourceTree = ""; + }; + "OBJ_170" = { + isa = "PBXFileReference"; + path = "BeLessThanOrEqual.swift"; + sourceTree = ""; + }; + "OBJ_171" = { + isa = "PBXFileReference"; + path = "BeLogical.swift"; + sourceTree = ""; + }; + "OBJ_172" = { + isa = "PBXFileReference"; + path = "BeNil.swift"; + sourceTree = ""; + }; + "OBJ_173" = { + isa = "PBXFileReference"; + path = "BeVoid.swift"; + sourceTree = ""; + }; + "OBJ_174" = { + isa = "PBXFileReference"; + path = "BeginWith.swift"; + sourceTree = ""; + }; + "OBJ_175" = { + isa = "PBXFileReference"; + path = "Contain.swift"; + sourceTree = ""; + }; + "OBJ_176" = { + isa = "PBXFileReference"; + path = "ContainElementSatisfying.swift"; + sourceTree = ""; + }; + "OBJ_177" = { + isa = "PBXFileReference"; + path = "ElementsEqual.swift"; + sourceTree = ""; + }; + "OBJ_178" = { + isa = "PBXFileReference"; + path = "EndWith.swift"; + sourceTree = ""; + }; + "OBJ_179" = { + isa = "PBXFileReference"; + path = "Equal.swift"; + sourceTree = ""; + }; + "OBJ_18" = { + isa = "PBXFileReference"; + path = "DefaultContainerComponent.swift"; + sourceTree = ""; + }; + "OBJ_180" = { + isa = "PBXFileReference"; + path = "HaveCount.swift"; + sourceTree = ""; + }; + "OBJ_181" = { + isa = "PBXFileReference"; + path = "Match.swift"; + sourceTree = ""; + }; + "OBJ_182" = { + isa = "PBXFileReference"; + path = "MatchError.swift"; + sourceTree = ""; + }; + "OBJ_183" = { + isa = "PBXFileReference"; + path = "MatcherFunc.swift"; + sourceTree = ""; + }; + "OBJ_184" = { + isa = "PBXFileReference"; + path = "MatcherProtocols.swift"; + sourceTree = ""; + }; + "OBJ_185" = { + isa = "PBXFileReference"; + path = "PostNotification.swift"; + sourceTree = ""; + }; + "OBJ_186" = { + isa = "PBXFileReference"; + path = "Predicate.swift"; + sourceTree = ""; + }; + "OBJ_187" = { + isa = "PBXFileReference"; + path = "RaisesException.swift"; + sourceTree = ""; + }; + "OBJ_188" = { + isa = "PBXFileReference"; + path = "SatisfyAllOf.swift"; + sourceTree = ""; + }; + "OBJ_189" = { + isa = "PBXFileReference"; + path = "SatisfyAnyOf.swift"; + sourceTree = ""; + }; + "OBJ_19" = { + isa = "PBXFileReference"; + path = "FactoryContainerComponent.swift"; + sourceTree = ""; + }; + "OBJ_190" = { + isa = "PBXFileReference"; + path = "ThrowAssertion.swift"; + sourceTree = ""; + }; + "OBJ_191" = { + isa = "PBXFileReference"; + path = "ThrowError.swift"; + sourceTree = ""; + }; + "OBJ_192" = { + isa = "PBXFileReference"; + path = "ToSucceed.swift"; + sourceTree = ""; + }; + "OBJ_193" = { + isa = "PBXGroup"; + children = ( + "OBJ_194", + "OBJ_195", + "OBJ_196", + "OBJ_197", + "OBJ_198" + ); + name = "Utils"; + path = "Utils"; + sourceTree = ""; + }; + "OBJ_194" = { + isa = "PBXFileReference"; + path = "Await.swift"; + sourceTree = ""; + }; + "OBJ_195" = { + isa = "PBXFileReference"; + path = "Errors.swift"; + sourceTree = ""; + }; + "OBJ_196" = { + isa = "PBXFileReference"; + path = "Functional.swift"; + sourceTree = ""; + }; + "OBJ_197" = { + isa = "PBXFileReference"; + path = "SourceLocation.swift"; + sourceTree = ""; + }; + "OBJ_198" = { + isa = "PBXFileReference"; + path = "Stringers.swift"; + sourceTree = ""; + }; + "OBJ_199" = { + isa = "PBXFileReference"; + explicitFileType = "sourcecode.swift"; + name = "Package.swift"; + path = "/Users/kawoou/GitHub/Deli/.build/checkouts/Nimble/Package.swift"; + sourceTree = ""; + }; + "OBJ_2" = { + isa = "XCConfigurationList"; + buildConfigurations = ( + "OBJ_3", + "OBJ_4" + ); + defaultConfigurationIsVisible = "0"; + defaultConfigurationName = "Release"; + }; + "OBJ_20" = { + isa = "PBXFileReference"; + path = "Container.swift"; + sourceTree = ""; + }; + "OBJ_200" = { + isa = "PBXGroup"; + children = ( + "Deli::Deli::Product", + "Deli::DeliTests::Product", + "Quick::Quick::Product", + "Nimble::Nimble::Product", + "Quick::QuickSpecBase::Product" + ); + name = "Products"; + path = ""; + sourceTree = "BUILT_PRODUCTS_DIR"; + }; + "OBJ_206" = { + isa = "PBXFileReference"; + path = "Design"; + sourceTree = "SOURCE_ROOT"; + }; + "OBJ_207" = { + isa = "PBXFileReference"; + path = "Supports"; + sourceTree = "SOURCE_ROOT"; + }; + "OBJ_208" = { + isa = "PBXFileReference"; + path = "Examples"; + sourceTree = "SOURCE_ROOT"; + }; + "OBJ_209" = { + isa = "PBXFileReference"; + path = "Binary"; + sourceTree = "SOURCE_ROOT"; + }; + "OBJ_21" = { + isa = "PBXGroup"; + children = ( + "OBJ_22" + ); + name = "Error"; + path = "Error"; + sourceTree = ""; + }; + "OBJ_210" = { + isa = "PBXFileReference"; + path = "codecov.yml"; + sourceTree = ""; + }; + "OBJ_211" = { + isa = "PBXFileReference"; + path = "LICENSE"; + sourceTree = ""; + }; + "OBJ_212" = { + isa = "PBXFileReference"; + path = "README_KR.md"; + sourceTree = ""; + }; + "OBJ_213" = { + isa = "PBXFileReference"; + path = "README.md"; + sourceTree = ""; + }; + "OBJ_214" = { + isa = "PBXFileReference"; + path = "Deli.podspec"; + sourceTree = ""; + }; + "OBJ_215" = { + isa = "PBXFileReference"; + path = "version"; + sourceTree = ""; + }; + "OBJ_216" = { + isa = "PBXFileReference"; + path = "deli.yml"; + sourceTree = ""; + }; + "OBJ_217" = { + isa = "PBXFileReference"; + path = "DeliBinary.podspec"; + sourceTree = ""; + }; + "OBJ_219" = { + isa = "XCConfigurationList"; + buildConfigurations = ( + "OBJ_220", + "OBJ_221" + ); + defaultConfigurationIsVisible = "0"; + defaultConfigurationName = "Release"; + }; + "OBJ_22" = { + isa = "PBXFileReference"; + path = "ContainerError.swift"; + sourceTree = ""; + }; + "OBJ_220" = { + isa = "XCBuildConfiguration"; + buildSettings = { + ENABLE_TESTABILITY = "YES"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks" + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)" + ); + INFOPLIST_FILE = "Deli.xcodeproj/Deli_Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = "8.0"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx" + ); + MACOSX_DEPLOYMENT_TARGET = "10.10"; + OTHER_CFLAGS = ( + "$(inherited)" + ); + OTHER_LDFLAGS = ( + "$(inherited)" + ); + OTHER_SWIFT_FLAGS = ( + "$(inherited)" + ); + PRODUCT_BUNDLE_IDENTIFIER = "Deli"; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = "YES"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)" + ); + SWIFT_VERSION = "5.0"; + TARGET_NAME = "Deli"; + TVOS_DEPLOYMENT_TARGET = "9.0"; + WATCHOS_DEPLOYMENT_TARGET = "2.0"; + }; + name = "Debug"; + }; + "OBJ_221" = { + isa = "XCBuildConfiguration"; + buildSettings = { + ENABLE_TESTABILITY = "YES"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks" + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)" + ); + INFOPLIST_FILE = "Deli.xcodeproj/Deli_Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = "8.0"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx" + ); + MACOSX_DEPLOYMENT_TARGET = "10.10"; + OTHER_CFLAGS = ( + "$(inherited)" + ); + OTHER_LDFLAGS = ( + "$(inherited)" + ); + OTHER_SWIFT_FLAGS = ( + "$(inherited)" + ); + PRODUCT_BUNDLE_IDENTIFIER = "Deli"; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = "YES"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)" + ); + SWIFT_VERSION = "5.0"; + TARGET_NAME = "Deli"; + TVOS_DEPLOYMENT_TARGET = "9.0"; + WATCHOS_DEPLOYMENT_TARGET = "2.0"; + }; + name = "Release"; + }; + "OBJ_222" = { + isa = "PBXSourcesBuildPhase"; + files = ( + "OBJ_223", + "OBJ_224", + "OBJ_225", + "OBJ_226", + "OBJ_227", + "OBJ_228", + "OBJ_229", + "OBJ_230", + "OBJ_231", + "OBJ_232", + "OBJ_233", + "OBJ_234", + "OBJ_235", + "OBJ_236", + "OBJ_237", + "OBJ_238", + "OBJ_239", + "OBJ_240", + "OBJ_241", + "OBJ_242", + "OBJ_243", + "OBJ_244", + "OBJ_245", + "OBJ_246", + "OBJ_247", + "OBJ_248", + "OBJ_249" + ); + }; + "OBJ_223" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_9"; + }; + "OBJ_224" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_10"; + }; + "OBJ_225" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_11"; + }; + "OBJ_226" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_12"; + }; + "OBJ_227" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_13"; + }; + "OBJ_228" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_15"; + }; + "OBJ_229" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_17"; + }; + "OBJ_23" = { + isa = "PBXGroup"; + children = ( + "OBJ_24", + "OBJ_25", + "OBJ_26", + "OBJ_27", + "OBJ_28", + "OBJ_29", + "OBJ_30" + ); + name = "Type"; + path = "Type"; + sourceTree = ""; + }; + "OBJ_230" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_18"; + }; + "OBJ_231" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_19"; + }; + "OBJ_232" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_20"; + }; + "OBJ_233" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_22"; + }; + "OBJ_234" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_24"; + }; + "OBJ_235" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_25"; + }; + "OBJ_236" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_26"; + }; + "OBJ_237" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_27"; + }; + "OBJ_238" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_28"; + }; + "OBJ_239" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_29"; + }; + "OBJ_24" = { + isa = "PBXFileReference"; + path = "FactoryResolver.swift"; + sourceTree = ""; + }; + "OBJ_240" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_30"; + }; + "OBJ_241" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_31"; + }; + "OBJ_242" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_32"; + }; + "OBJ_243" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_33"; + }; + "OBJ_244" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_34"; + }; + "OBJ_245" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_35"; + }; + "OBJ_246" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_36"; + }; + "OBJ_247" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_37"; + }; + "OBJ_248" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_38"; + }; + "OBJ_249" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_39"; + }; + "OBJ_25" = { + isa = "PBXFileReference"; + path = "Linker.swift"; + sourceTree = ""; + }; + "OBJ_250" = { + isa = "PBXFrameworksBuildPhase"; + files = ( + ); + }; + "OBJ_252" = { + isa = "XCConfigurationList"; + buildConfigurations = ( + "OBJ_253", + "OBJ_254" + ); + defaultConfigurationIsVisible = "0"; + defaultConfigurationName = "Release"; + }; + "OBJ_253" = { + isa = "XCBuildConfiguration"; + buildSettings = { + LD = "/usr/bin/true"; + OTHER_SWIFT_FLAGS = ( + "-swift-version", + "5", + "-I", + "$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2", + "-target", + "x86_64-apple-macosx10.10", + "-sdk", + "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk", + "-package-description-version", + "5" + ); + SWIFT_VERSION = "5.0"; + }; + name = "Debug"; + }; + "OBJ_254" = { + isa = "XCBuildConfiguration"; + buildSettings = { + LD = "/usr/bin/true"; + OTHER_SWIFT_FLAGS = ( + "-swift-version", + "5", + "-I", + "$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2", + "-target", + "x86_64-apple-macosx10.10", + "-sdk", + "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk", + "-package-description-version", + "5" + ); + SWIFT_VERSION = "5.0"; + }; + name = "Release"; + }; + "OBJ_255" = { + isa = "PBXSourcesBuildPhase"; + files = ( + "OBJ_256" + ); + }; + "OBJ_256" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_6"; + }; + "OBJ_258" = { + isa = "XCConfigurationList"; + buildConfigurations = ( + "OBJ_259", + "OBJ_260" + ); + defaultConfigurationIsVisible = "0"; + defaultConfigurationName = "Release"; + }; + "OBJ_259" = { + isa = "XCBuildConfiguration"; + buildSettings = { + }; + name = "Debug"; + }; + "OBJ_26" = { + isa = "PBXFileReference"; + path = "LoadPriority.swift"; + sourceTree = ""; + }; + "OBJ_260" = { + isa = "XCBuildConfiguration"; + buildSettings = { + }; + name = "Release"; + }; + "OBJ_261" = { + isa = "PBXTargetDependency"; + target = "Deli::DeliTests"; + }; + "OBJ_263" = { + isa = "XCConfigurationList"; + buildConfigurations = ( + "OBJ_264", + "OBJ_265" + ); + defaultConfigurationIsVisible = "0"; + defaultConfigurationName = "Release"; + }; + "OBJ_264" = { + isa = "XCBuildConfiguration"; + buildSettings = { + CLANG_ENABLE_MODULES = "YES"; + EMBEDDED_CONTENT_CONTAINS_SWIFT = "YES"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks" + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/.build/checkouts/Quick/Sources/QuickSpecBase/include" + ); + INFOPLIST_FILE = "Deli.xcodeproj/DeliTests_Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = "8.0"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@loader_path/../Frameworks", + "@loader_path/Frameworks" + ); + MACOSX_DEPLOYMENT_TARGET = "10.10"; + OTHER_CFLAGS = ( + "$(inherited)" + ); + OTHER_LDFLAGS = ( + "$(inherited)" + ); + OTHER_SWIFT_FLAGS = ( + "$(inherited)" + ); + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)" + ); + SWIFT_VERSION = "5.0"; + TARGET_NAME = "DeliTests"; + TVOS_DEPLOYMENT_TARGET = "9.0"; + WATCHOS_DEPLOYMENT_TARGET = "2.0"; + }; + name = "Debug"; + }; + "OBJ_265" = { + isa = "XCBuildConfiguration"; + buildSettings = { + CLANG_ENABLE_MODULES = "YES"; + EMBEDDED_CONTENT_CONTAINS_SWIFT = "YES"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks" + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/.build/checkouts/Quick/Sources/QuickSpecBase/include" + ); + INFOPLIST_FILE = "Deli.xcodeproj/DeliTests_Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = "8.0"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@loader_path/../Frameworks", + "@loader_path/Frameworks" + ); + MACOSX_DEPLOYMENT_TARGET = "10.10"; + OTHER_CFLAGS = ( + "$(inherited)" + ); + OTHER_LDFLAGS = ( + "$(inherited)" + ); + OTHER_SWIFT_FLAGS = ( + "$(inherited)" + ); + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)" + ); + SWIFT_VERSION = "5.0"; + TARGET_NAME = "DeliTests"; + TVOS_DEPLOYMENT_TARGET = "9.0"; + WATCHOS_DEPLOYMENT_TARGET = "2.0"; + }; + name = "Release"; + }; + "OBJ_266" = { + isa = "PBXSourcesBuildPhase"; + files = ( + "OBJ_267", + "OBJ_268", + "OBJ_269", + "OBJ_270", + "OBJ_271", + "OBJ_272", + "OBJ_273", + "OBJ_274", + "OBJ_275", + "OBJ_276", + "OBJ_277", + "OBJ_278", + "OBJ_279", + "OBJ_280", + "OBJ_281", + "OBJ_282", + "OBJ_283", + "OBJ_284", + "OBJ_285", + "OBJ_286", + "OBJ_287", + "OBJ_288", + "OBJ_289", + "OBJ_290", + "OBJ_291", + "OBJ_292", + "OBJ_293", + "OBJ_294", + "OBJ_295", + "OBJ_296", + "OBJ_297", + "OBJ_298", + "OBJ_299", + "OBJ_300", + "OBJ_301", + "OBJ_302", + "OBJ_303", + "OBJ_304", + "OBJ_305", + "OBJ_306", + "OBJ_307", + "OBJ_308", + "OBJ_309", + "OBJ_310", + "OBJ_311", + "OBJ_312", + "OBJ_313", + "OBJ_314", + "OBJ_315", + "OBJ_316", + "OBJ_317", + "OBJ_318", + "OBJ_319", + "OBJ_320", + "OBJ_321", + "OBJ_322", + "OBJ_323", + "OBJ_324" + ); + }; + "OBJ_267" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_43"; + }; + "OBJ_268" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_44"; + }; + "OBJ_269" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_45"; + }; + "OBJ_27" = { + isa = "PBXFileReference"; + path = "ResolveRole.swift"; + sourceTree = ""; + }; + "OBJ_270" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_47"; + }; + "OBJ_271" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_48"; + }; + "OBJ_272" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_49"; + }; + "OBJ_273" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_50"; + }; + "OBJ_274" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_51"; + }; + "OBJ_275" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_52"; + }; + "OBJ_276" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_53"; + }; + "OBJ_277" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_54"; + }; + "OBJ_278" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_55"; + }; + "OBJ_279" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_56"; + }; + "OBJ_28" = { + isa = "PBXFileReference"; + path = "Resolver.swift"; + sourceTree = ""; + }; + "OBJ_280" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_57"; + }; + "OBJ_281" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_58"; + }; + "OBJ_282" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_59"; + }; + "OBJ_283" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_60"; + }; + "OBJ_284" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_61"; + }; + "OBJ_285" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_62"; + }; + "OBJ_286" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_63"; + }; + "OBJ_287" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_64"; + }; + "OBJ_288" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_65"; + }; + "OBJ_289" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_67"; + }; + "OBJ_29" = { + isa = "PBXFileReference"; + path = "Scope.swift"; + sourceTree = ""; + }; + "OBJ_290" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_68"; + }; + "OBJ_291" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_69"; + }; + "OBJ_292" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_70"; + }; + "OBJ_293" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_71"; + }; + "OBJ_294" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_72"; + }; + "OBJ_295" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_73"; + }; + "OBJ_296" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_74"; + }; + "OBJ_297" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_75"; + }; + "OBJ_298" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_77"; + }; + "OBJ_299" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_78"; + }; + "OBJ_3" = { + isa = "XCBuildConfiguration"; + buildSettings = { + CLANG_ENABLE_OBJC_ARC = "YES"; + COMBINE_HIDPI_IMAGES = "YES"; + COPY_PHASE_STRIP = "NO"; + DEBUG_INFORMATION_FORMAT = "dwarf"; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_NS_ASSERTIONS = "YES"; + GCC_OPTIMIZATION_LEVEL = "0"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "SWIFT_PACKAGE=1", + "DEBUG=1" + ); + MACOSX_DEPLOYMENT_TARGET = "10.10"; + ONLY_ACTIVE_ARCH = "YES"; + OTHER_SWIFT_FLAGS = ( + "$(inherited)", + "-DXcode" + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = "macosx"; + SUPPORTED_PLATFORMS = ( + "macosx", + "iphoneos", + "iphonesimulator", + "appletvos", + "appletvsimulator", + "watchos", + "watchsimulator" + ); + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)", + "SWIFT_PACKAGE", + "DEBUG" + ); + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + USE_HEADERMAP = "NO"; + }; + name = "Debug"; + }; + "OBJ_30" = { + isa = "PBXFileReference"; + path = "TypeKey.swift"; + sourceTree = ""; + }; + "OBJ_300" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_80"; + }; + "OBJ_301" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_81"; + }; + "OBJ_302" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_82"; + }; + "OBJ_303" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_83"; + }; + "OBJ_304" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_85"; + }; + "OBJ_305" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_86"; + }; + "OBJ_306" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_87"; + }; + "OBJ_307" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_88"; + }; + "OBJ_308" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_89"; + }; + "OBJ_309" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_90"; + }; + "OBJ_31" = { + isa = "PBXFileReference"; + path = "Dependency.swift"; + sourceTree = ""; + }; + "OBJ_310" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_91"; + }; + "OBJ_311" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_92"; + }; + "OBJ_312" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_93"; + }; + "OBJ_313" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_94"; + }; + "OBJ_314" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_95"; + }; + "OBJ_315" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_96"; + }; + "OBJ_316" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_97"; + }; + "OBJ_317" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_98"; + }; + "OBJ_318" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_99"; + }; + "OBJ_319" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_100"; + }; + "OBJ_32" = { + isa = "PBXFileReference"; + path = "DependencyArray.swift"; + sourceTree = ""; + }; + "OBJ_320" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_101"; + }; + "OBJ_321" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_102"; + }; + "OBJ_322" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_103"; + }; + "OBJ_323" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_105"; + }; + "OBJ_324" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_106"; + }; + "OBJ_325" = { + isa = "PBXFrameworksBuildPhase"; + files = ( + "OBJ_326", + "OBJ_327", + "OBJ_328", + "OBJ_329" + ); + }; + "OBJ_326" = { + isa = "PBXBuildFile"; + fileRef = "Nimble::Nimble::Product"; + }; + "OBJ_327" = { + isa = "PBXBuildFile"; + fileRef = "Quick::Quick::Product"; + }; + "OBJ_328" = { + isa = "PBXBuildFile"; + fileRef = "Quick::QuickSpecBase::Product"; + }; + "OBJ_329" = { + isa = "PBXBuildFile"; + fileRef = "Deli::Deli::Product"; + }; + "OBJ_33" = { + isa = "PBXFileReference"; + path = "Factory.swift"; + sourceTree = ""; + }; + "OBJ_330" = { + isa = "PBXTargetDependency"; + target = "Nimble::Nimble"; + }; + "OBJ_332" = { + isa = "PBXTargetDependency"; + target = "Quick::Quick"; + }; + "OBJ_334" = { + isa = "PBXTargetDependency"; + target = "Quick::QuickSpecBase"; + }; + "OBJ_336" = { + isa = "PBXTargetDependency"; + target = "Deli::Deli"; + }; + "OBJ_337" = { + isa = "XCConfigurationList"; + buildConfigurations = ( + "OBJ_338", + "OBJ_339" + ); + defaultConfigurationIsVisible = "0"; + defaultConfigurationName = "Release"; + }; + "OBJ_338" = { + isa = "XCBuildConfiguration"; + buildSettings = { + ENABLE_TESTABILITY = "YES"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks" + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)" + ); + INFOPLIST_FILE = "Deli.xcodeproj/Nimble_Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = "8.0"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx" + ); + MACOSX_DEPLOYMENT_TARGET = "10.10"; + OTHER_CFLAGS = ( + "$(inherited)" + ); + OTHER_LDFLAGS = ( + "$(inherited)" + ); + OTHER_SWIFT_FLAGS = ( + "$(inherited)" + ); + PRODUCT_BUNDLE_IDENTIFIER = "Nimble"; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = "YES"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)" + ); + SWIFT_VERSION = "5.0"; + TARGET_NAME = "Nimble"; + TVOS_DEPLOYMENT_TARGET = "9.0"; + WATCHOS_DEPLOYMENT_TARGET = "2.0"; + }; + name = "Debug"; + }; + "OBJ_339" = { + isa = "XCBuildConfiguration"; + buildSettings = { + ENABLE_TESTABILITY = "YES"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks" + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)" + ); + INFOPLIST_FILE = "Deli.xcodeproj/Nimble_Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = "8.0"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx" + ); + MACOSX_DEPLOYMENT_TARGET = "10.10"; + OTHER_CFLAGS = ( + "$(inherited)" + ); + OTHER_LDFLAGS = ( + "$(inherited)" + ); + OTHER_SWIFT_FLAGS = ( + "$(inherited)" + ); + PRODUCT_BUNDLE_IDENTIFIER = "Nimble"; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = "YES"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)" + ); + SWIFT_VERSION = "5.0"; + TARGET_NAME = "Nimble"; + TVOS_DEPLOYMENT_TARGET = "9.0"; + WATCHOS_DEPLOYMENT_TARGET = "2.0"; + }; + name = "Release"; + }; + "OBJ_34" = { + isa = "PBXFileReference"; + path = "Inject.swift"; + sourceTree = ""; + }; + "OBJ_340" = { + isa = "PBXSourcesBuildPhase"; + files = ( + "OBJ_341", + "OBJ_342", + "OBJ_343", + "OBJ_344", + "OBJ_345", + "OBJ_346", + "OBJ_347", + "OBJ_348", + "OBJ_349", + "OBJ_350", + "OBJ_351", + "OBJ_352", + "OBJ_353", + "OBJ_354", + "OBJ_355", + "OBJ_356", + "OBJ_357", + "OBJ_358", + "OBJ_359", + "OBJ_360", + "OBJ_361", + "OBJ_362", + "OBJ_363", + "OBJ_364", + "OBJ_365", + "OBJ_366", + "OBJ_367", + "OBJ_368", + "OBJ_369", + "OBJ_370", + "OBJ_371", + "OBJ_372", + "OBJ_373", + "OBJ_374", + "OBJ_375", + "OBJ_376", + "OBJ_377", + "OBJ_378", + "OBJ_379", + "OBJ_380", + "OBJ_381", + "OBJ_382", + "OBJ_383", + "OBJ_384", + "OBJ_385", + "OBJ_386", + "OBJ_387", + "OBJ_388", + "OBJ_389", + "OBJ_390", + "OBJ_391", + "OBJ_392" + ); + }; + "OBJ_341" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_144"; + }; + "OBJ_342" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_145"; + }; + "OBJ_343" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_146"; + }; + "OBJ_344" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_147"; + }; + "OBJ_345" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_148"; + }; + "OBJ_346" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_149"; + }; + "OBJ_347" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_150"; + }; + "OBJ_348" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_152"; + }; + "OBJ_349" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_153"; + }; + "OBJ_35" = { + isa = "PBXFileReference"; + path = "LazyAutowired.swift"; + sourceTree = ""; + }; + "OBJ_350" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_154"; + }; + "OBJ_351" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_155"; + }; + "OBJ_352" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_156"; + }; + "OBJ_353" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_157"; + }; + "OBJ_354" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_158"; + }; + "OBJ_355" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_160"; + }; + "OBJ_356" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_161"; + }; + "OBJ_357" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_162"; + }; + "OBJ_358" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_163"; + }; + "OBJ_359" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_164"; + }; + "OBJ_36" = { + isa = "PBXFileReference"; + path = "LazyAutowiredFactory.swift"; + sourceTree = ""; + }; + "OBJ_360" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_165"; + }; + "OBJ_361" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_166"; + }; + "OBJ_362" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_167"; + }; + "OBJ_363" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_168"; + }; + "OBJ_364" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_169"; + }; + "OBJ_365" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_170"; + }; + "OBJ_366" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_171"; + }; + "OBJ_367" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_172"; + }; + "OBJ_368" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_173"; + }; + "OBJ_369" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_174"; + }; + "OBJ_37" = { + isa = "PBXFileReference"; + path = "ModuleFactory.swift"; + sourceTree = ""; + }; + "OBJ_370" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_175"; + }; + "OBJ_371" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_176"; + }; + "OBJ_372" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_177"; + }; + "OBJ_373" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_178"; + }; + "OBJ_374" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_179"; + }; + "OBJ_375" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_180"; + }; + "OBJ_376" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_181"; + }; + "OBJ_377" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_182"; + }; + "OBJ_378" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_183"; + }; + "OBJ_379" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_184"; + }; + "OBJ_38" = { + isa = "PBXFileReference"; + path = "Payload.swift"; + sourceTree = ""; + }; + "OBJ_380" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_185"; + }; + "OBJ_381" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_186"; + }; + "OBJ_382" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_187"; + }; + "OBJ_383" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_188"; + }; + "OBJ_384" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_189"; + }; + "OBJ_385" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_190"; + }; + "OBJ_386" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_191"; + }; + "OBJ_387" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_192"; + }; + "OBJ_388" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_194"; + }; + "OBJ_389" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_195"; + }; + "OBJ_39" = { + isa = "PBXFileReference"; + path = "PropertyValue.swift"; + sourceTree = ""; + }; + "OBJ_390" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_196"; + }; + "OBJ_391" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_197"; + }; + "OBJ_392" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_198"; + }; + "OBJ_393" = { + isa = "PBXFrameworksBuildPhase"; + files = ( + ); + }; + "OBJ_395" = { + isa = "XCConfigurationList"; + buildConfigurations = ( + "OBJ_396", + "OBJ_397" + ); + defaultConfigurationIsVisible = "0"; + defaultConfigurationName = "Release"; + }; + "OBJ_396" = { + isa = "XCBuildConfiguration"; + buildSettings = { + LD = "/usr/bin/true"; + OTHER_SWIFT_FLAGS = ( + "-swift-version", + "5", + "-I", + "$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2", + "-target", + "x86_64-apple-macosx10.10", + "-sdk", + "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk", + "-package-description-version", + "5" + ); + SWIFT_VERSION = "5.0"; + }; + name = "Debug"; + }; + "OBJ_397" = { + isa = "XCBuildConfiguration"; + buildSettings = { + LD = "/usr/bin/true"; + OTHER_SWIFT_FLAGS = ( + "-swift-version", + "5", + "-I", + "$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2", + "-target", + "x86_64-apple-macosx10.10", + "-sdk", + "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk", + "-package-description-version", + "5" + ); + SWIFT_VERSION = "5.0"; + }; + name = "Release"; + }; + "OBJ_398" = { + isa = "PBXSourcesBuildPhase"; + files = ( + "OBJ_399" + ); + }; + "OBJ_399" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_199"; + }; + "OBJ_4" = { + isa = "XCBuildConfiguration"; + buildSettings = { + CLANG_ENABLE_OBJC_ARC = "YES"; + COMBINE_HIDPI_IMAGES = "YES"; + COPY_PHASE_STRIP = "YES"; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_OPTIMIZATION_LEVEL = "s"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "SWIFT_PACKAGE=1" + ); + MACOSX_DEPLOYMENT_TARGET = "10.10"; + OTHER_SWIFT_FLAGS = ( + "$(inherited)", + "-DXcode" + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = "macosx"; + SUPPORTED_PLATFORMS = ( + "macosx", + "iphoneos", + "iphonesimulator", + "appletvos", + "appletvsimulator", + "watchos", + "watchsimulator" + ); + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)", + "SWIFT_PACKAGE" + ); + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + USE_HEADERMAP = "NO"; + }; + name = "Release"; + }; + "OBJ_40" = { + isa = "PBXGroup"; + children = ( + "OBJ_41" + ); + name = "Tests"; + path = ""; + sourceTree = "SOURCE_ROOT"; + }; + "OBJ_400" = { + isa = "XCConfigurationList"; + buildConfigurations = ( + "OBJ_401", + "OBJ_402" + ); + defaultConfigurationIsVisible = "0"; + defaultConfigurationName = "Release"; + }; + "OBJ_401" = { + isa = "XCBuildConfiguration"; + buildSettings = { + ENABLE_TESTABILITY = "YES"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks" + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/.build/checkouts/Quick/Sources/QuickSpecBase/include" + ); + INFOPLIST_FILE = "Deli.xcodeproj/Quick_Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = "8.0"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx" + ); + MACOSX_DEPLOYMENT_TARGET = "10.10"; + OTHER_CFLAGS = ( + "$(inherited)" + ); + OTHER_LDFLAGS = ( + "$(inherited)" + ); + OTHER_SWIFT_FLAGS = ( + "$(inherited)" + ); + PRODUCT_BUNDLE_IDENTIFIER = "Quick"; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = "YES"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)" + ); + SWIFT_VERSION = "5.0"; + TARGET_NAME = "Quick"; + TVOS_DEPLOYMENT_TARGET = "9.0"; + WATCHOS_DEPLOYMENT_TARGET = "2.0"; + }; + name = "Debug"; + }; + "OBJ_402" = { + isa = "XCBuildConfiguration"; + buildSettings = { + ENABLE_TESTABILITY = "YES"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks" + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/.build/checkouts/Quick/Sources/QuickSpecBase/include" + ); + INFOPLIST_FILE = "Deli.xcodeproj/Quick_Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = "8.0"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx" + ); + MACOSX_DEPLOYMENT_TARGET = "10.10"; + OTHER_CFLAGS = ( + "$(inherited)" + ); + OTHER_LDFLAGS = ( + "$(inherited)" + ); + OTHER_SWIFT_FLAGS = ( + "$(inherited)" + ); + PRODUCT_BUNDLE_IDENTIFIER = "Quick"; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = "YES"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)" + ); + SWIFT_VERSION = "5.0"; + TARGET_NAME = "Quick"; + TVOS_DEPLOYMENT_TARGET = "9.0"; + WATCHOS_DEPLOYMENT_TARGET = "2.0"; + }; + name = "Release"; + }; + "OBJ_403" = { + isa = "PBXSourcesBuildPhase"; + files = ( + "OBJ_404", + "OBJ_405", + "OBJ_406", + "OBJ_407", + "OBJ_408", + "OBJ_409", + "OBJ_410", + "OBJ_411", + "OBJ_412", + "OBJ_413", + "OBJ_414", + "OBJ_415", + "OBJ_416", + "OBJ_417", + "OBJ_418", + "OBJ_419", + "OBJ_420", + "OBJ_421", + "OBJ_422", + "OBJ_423", + "OBJ_424", + "OBJ_425", + "OBJ_426" + ); + }; + "OBJ_404" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_110"; + }; + "OBJ_405" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_111"; + }; + "OBJ_406" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_113"; + }; + "OBJ_407" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_114"; + }; + "OBJ_408" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_116"; + }; + "OBJ_409" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_117"; + }; + "OBJ_41" = { + isa = "PBXGroup"; + children = ( + "OBJ_42", + "OBJ_103", + "OBJ_104" + ); + name = "DeliTests"; + path = "Tests/DeliTests"; + sourceTree = "SOURCE_ROOT"; + }; + "OBJ_410" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_118"; + }; + "OBJ_411" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_119"; + }; + "OBJ_412" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_120"; + }; + "OBJ_413" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_121"; + }; + "OBJ_414" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_122"; + }; + "OBJ_415" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_124"; + }; + "OBJ_416" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_125"; + }; + "OBJ_417" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_126"; + }; + "OBJ_418" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_127"; + }; + "OBJ_419" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_128"; + }; + "OBJ_42" = { + isa = "PBXGroup"; + children = ( + "OBJ_43", + "OBJ_44", + "OBJ_45", + "OBJ_46", + "OBJ_53", + "OBJ_54", + "OBJ_55", + "OBJ_56", + "OBJ_57", + "OBJ_58", + "OBJ_59", + "OBJ_60", + "OBJ_61", + "OBJ_62", + "OBJ_63", + "OBJ_64", + "OBJ_65", + "OBJ_66", + "OBJ_76", + "OBJ_79", + "OBJ_84", + "OBJ_89", + "OBJ_90", + "OBJ_91", + "OBJ_92", + "OBJ_93", + "OBJ_94", + "OBJ_95", + "OBJ_96", + "OBJ_97", + "OBJ_98", + "OBJ_99", + "OBJ_100", + "OBJ_101", + "OBJ_102" + ); + name = "DeliSample"; + path = "DeliSample"; + sourceTree = ""; + }; + "OBJ_420" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_129"; + }; + "OBJ_421" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_130"; + }; + "OBJ_422" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_131"; + }; + "OBJ_423" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_132"; + }; + "OBJ_424" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_133"; + }; + "OBJ_425" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_134"; + }; + "OBJ_426" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_135"; + }; + "OBJ_427" = { + isa = "PBXFrameworksBuildPhase"; + files = ( + "OBJ_428" + ); + }; + "OBJ_428" = { + isa = "PBXBuildFile"; + fileRef = "Quick::QuickSpecBase::Product"; + }; + "OBJ_429" = { + isa = "PBXTargetDependency"; + target = "Quick::QuickSpecBase"; + }; + "OBJ_43" = { + isa = "PBXFileReference"; + path = "AccountConfiguration.swift"; + sourceTree = ""; + }; + "OBJ_431" = { + isa = "XCConfigurationList"; + buildConfigurations = ( + "OBJ_432", + "OBJ_433" + ); + defaultConfigurationIsVisible = "0"; + defaultConfigurationName = "Release"; + }; + "OBJ_432" = { + isa = "XCBuildConfiguration"; + buildSettings = { + LD = "/usr/bin/true"; + OTHER_SWIFT_FLAGS = ( + "-swift-version", + "5", + "-I", + "$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2", + "-target", + "x86_64-apple-macosx10.10", + "-sdk", + "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk", + "-package-description-version", + "5" + ); + SWIFT_VERSION = "5.0"; + }; + name = "Debug"; + }; + "OBJ_433" = { + isa = "XCBuildConfiguration"; + buildSettings = { + LD = "/usr/bin/true"; + OTHER_SWIFT_FLAGS = ( + "-swift-version", + "5", + "-I", + "$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2", + "-target", + "x86_64-apple-macosx10.10", + "-sdk", + "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk", + "-package-description-version", + "5" + ); + SWIFT_VERSION = "5.0"; + }; + name = "Release"; + }; + "OBJ_434" = { + isa = "PBXSourcesBuildPhase"; + files = ( + "OBJ_435" + ); + }; + "OBJ_435" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_140"; + }; + "OBJ_436" = { + isa = "XCConfigurationList"; + buildConfigurations = ( + "OBJ_437", + "OBJ_438" + ); + defaultConfigurationIsVisible = "0"; + defaultConfigurationName = "Release"; + }; + "OBJ_437" = { + isa = "XCBuildConfiguration"; + buildSettings = { + CLANG_ENABLE_MODULES = "YES"; + DEFINES_MODULE = "YES"; + ENABLE_TESTABILITY = "YES"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks" + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/.build/checkouts/Quick/Sources/QuickSpecBase/include" + ); + INFOPLIST_FILE = "Deli.xcodeproj/QuickSpecBase_Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = "8.0"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx" + ); + MACOSX_DEPLOYMENT_TARGET = "10.10"; + OTHER_CFLAGS = ( + "$(inherited)" + ); + OTHER_LDFLAGS = ( + "$(inherited)" + ); + OTHER_SWIFT_FLAGS = ( + "$(inherited)" + ); + PRODUCT_BUNDLE_IDENTIFIER = "QuickSpecBase"; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = "YES"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)" + ); + TARGET_NAME = "QuickSpecBase"; + TVOS_DEPLOYMENT_TARGET = "9.0"; + WATCHOS_DEPLOYMENT_TARGET = "2.0"; + }; + name = "Debug"; + }; + "OBJ_438" = { + isa = "XCBuildConfiguration"; + buildSettings = { + CLANG_ENABLE_MODULES = "YES"; + DEFINES_MODULE = "YES"; + ENABLE_TESTABILITY = "YES"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks" + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/.build/checkouts/Quick/Sources/QuickSpecBase/include" + ); + INFOPLIST_FILE = "Deli.xcodeproj/QuickSpecBase_Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = "8.0"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx" + ); + MACOSX_DEPLOYMENT_TARGET = "10.10"; + OTHER_CFLAGS = ( + "$(inherited)" + ); + OTHER_LDFLAGS = ( + "$(inherited)" + ); + OTHER_SWIFT_FLAGS = ( + "$(inherited)" + ); + PRODUCT_BUNDLE_IDENTIFIER = "QuickSpecBase"; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = "YES"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)" + ); + TARGET_NAME = "QuickSpecBase"; + TVOS_DEPLOYMENT_TARGET = "9.0"; + WATCHOS_DEPLOYMENT_TARGET = "2.0"; + }; + name = "Release"; + }; + "OBJ_439" = { + isa = "PBXSourcesBuildPhase"; + files = ( + "OBJ_440" + ); + }; + "OBJ_44" = { + isa = "PBXFileReference"; + path = "AccountService.swift"; + sourceTree = ""; + }; + "OBJ_440" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_137"; + }; + "OBJ_441" = { + isa = "PBXHeadersBuildPhase"; + files = ( + "OBJ_442" + ); + }; + "OBJ_442" = { + isa = "PBXBuildFile"; + fileRef = "OBJ_139"; + settings = { + ATTRIBUTES = ( + "Public" + ); + }; + }; + "OBJ_443" = { + isa = "PBXFrameworksBuildPhase"; + files = ( + ); + }; + "OBJ_45" = { + isa = "PBXFileReference"; + path = "AlwaysModel.swift"; + sourceTree = ""; + }; + "OBJ_46" = { + isa = "PBXGroup"; + children = ( + "OBJ_47", + "OBJ_48", + "OBJ_49", + "OBJ_50", + "OBJ_51", + "OBJ_52" + ); + name = "Book"; + path = "Book"; + sourceTree = ""; + }; + "OBJ_47" = { + isa = "PBXFileReference"; + path = "Book.swift"; + sourceTree = ""; + }; + "OBJ_48" = { + isa = "PBXFileReference"; + path = "COSMOS.swift"; + sourceTree = ""; + }; + "OBJ_49" = { + isa = "PBXFileReference"; + path = "HarryPotter.swift"; + sourceTree = ""; + }; + "OBJ_5" = { + isa = "PBXGroup"; + children = ( + "OBJ_6", + "OBJ_7", + "OBJ_40", + "OBJ_107", + "OBJ_200", + "OBJ_206", + "OBJ_207", + "OBJ_208", + "OBJ_209", + "OBJ_210", + "OBJ_211", + "OBJ_212", + "OBJ_213", + "OBJ_214", + "OBJ_215", + "OBJ_216", + "OBJ_217" + ); + path = ""; + sourceTree = ""; + }; + "OBJ_50" = { + isa = "PBXFileReference"; + path = "Novel.swift"; + sourceTree = ""; + }; + "OBJ_51" = { + isa = "PBXFileReference"; + path = "Science.swift"; + sourceTree = ""; + }; + "OBJ_52" = { + isa = "PBXFileReference"; + path = "TroisiemeHumanite.swift"; + sourceTree = ""; + }; + "OBJ_53" = { + isa = "PBXFileReference"; + path = "DeliFactory.swift"; + sourceTree = ""; + }; + "OBJ_54" = { + isa = "PBXFileReference"; + path = "DependencyTestModel.swift"; + sourceTree = ""; + }; + "OBJ_55" = { + isa = "PBXFileReference"; + path = "FactoryTest.swift"; + sourceTree = ""; + }; + "OBJ_56" = { + isa = "PBXFileReference"; + path = "Friend.swift"; + sourceTree = ""; + }; + "OBJ_57" = { + isa = "PBXFileReference"; + path = "FriendInfoViewModel.swift"; + sourceTree = ""; + }; + "OBJ_58" = { + isa = "PBXFileReference"; + path = "FriendListViewModel.swift"; + sourceTree = ""; + }; + "OBJ_59" = { + isa = "PBXFileReference"; + path = "FriendPayload.swift"; + sourceTree = ""; + }; + "OBJ_6" = { + isa = "PBXFileReference"; + explicitFileType = "sourcecode.swift"; + path = "Package.swift"; + sourceTree = ""; + }; + "OBJ_60" = { + isa = "PBXFileReference"; + path = "FriendService.swift"; + sourceTree = ""; + }; + "OBJ_61" = { + isa = "PBXFileReference"; + path = "LazyAutowiredQualifier.swift"; + sourceTree = ""; + }; + "OBJ_62" = { + isa = "PBXFileReference"; + path = "LibraryService.swift"; + sourceTree = ""; + }; + "OBJ_63" = { + isa = "PBXFileReference"; + path = "MessageService.swift"; + sourceTree = ""; + }; + "OBJ_64" = { + isa = "PBXFileReference"; + path = "NestedType.swift"; + sourceTree = ""; + }; + "OBJ_65" = { + isa = "PBXFileReference"; + path = "NetworkManager.swift"; + sourceTree = ""; + }; + "OBJ_66" = { + isa = "PBXGroup"; + children = ( + "OBJ_67", + "OBJ_68", + "OBJ_69", + "OBJ_70", + "OBJ_71", + "OBJ_72", + "OBJ_73", + "OBJ_74", + "OBJ_75" + ); + name = "Property"; + path = "Property"; + sourceTree = ""; + }; + "OBJ_67" = { + isa = "PBXFileReference"; + path = "InjectPropertyTest.swift"; + sourceTree = ""; + }; + "OBJ_68" = { + isa = "PBXFileReference"; + path = "NetworkMethod.swift"; + sourceTree = ""; + }; + "OBJ_69" = { + isa = "PBXFileReference"; + path = "NetworkProvider.swift"; + sourceTree = ""; + }; + "OBJ_7" = { + isa = "PBXGroup"; + children = ( + "OBJ_8" + ); + name = "Sources"; + path = ""; + sourceTree = "SOURCE_ROOT"; + }; + "OBJ_70" = { + isa = "PBXFileReference"; + path = "PropertyAutowired.swift"; + sourceTree = ""; + }; + "OBJ_71" = { + isa = "PBXFileReference"; + path = "PropertyAutowiredFactory.swift"; + sourceTree = ""; + }; + "OBJ_72" = { + isa = "PBXFileReference"; + path = "PropertyInject.swift"; + sourceTree = ""; + }; + "OBJ_73" = { + isa = "PBXFileReference"; + path = "PropertyLazyAutowired.swift"; + sourceTree = ""; + }; + "OBJ_74" = { + isa = "PBXFileReference"; + path = "PropertyLazyAutowiredFactory.swift"; + sourceTree = ""; + }; + "OBJ_75" = { + isa = "PBXFileReference"; + path = "ServerConfig.swift"; + sourceTree = ""; + }; + "OBJ_76" = { + isa = "PBXGroup"; + children = ( + "OBJ_77", + "OBJ_78" + ); + name = "PropertyWrapper"; + path = "PropertyWrapper"; + sourceTree = ""; + }; + "OBJ_77" = { + isa = "PBXFileReference"; + path = "PropertyWrapperTest1.swift"; + sourceTree = ""; + }; + "OBJ_78" = { + isa = "PBXFileReference"; + path = "PropertyWrapperTest2.swift"; + sourceTree = ""; + }; + "OBJ_79" = { + isa = "PBXGroup"; + children = ( + "OBJ_80", + "OBJ_81", + "OBJ_82", + "OBJ_83" + ); + name = "Robot"; + path = "Robot"; + sourceTree = ""; + }; + "OBJ_8" = { + isa = "PBXGroup"; + children = ( + "OBJ_9", + "OBJ_10", + "OBJ_11", + "OBJ_12", + "OBJ_13", + "OBJ_14", + "OBJ_31", + "OBJ_32", + "OBJ_33", + "OBJ_34", + "OBJ_35", + "OBJ_36", + "OBJ_37", + "OBJ_38", + "OBJ_39" + ); + name = "Deli"; + path = "Sources/Deli"; + sourceTree = "SOURCE_ROOT"; + }; + "OBJ_80" = { + isa = "PBXFileReference"; + path = "Robot.swift"; + sourceTree = ""; + }; + "OBJ_81" = { + isa = "PBXFileReference"; + path = "RobotBody.swift"; + sourceTree = ""; + }; + "OBJ_82" = { + isa = "PBXFileReference"; + path = "RobotFactory.swift"; + sourceTree = ""; + }; + "OBJ_83" = { + isa = "PBXFileReference"; + path = "RobotHead.swift"; + sourceTree = ""; + }; + "OBJ_84" = { + isa = "PBXGroup"; + children = ( + "OBJ_85", + "OBJ_86", + "OBJ_87", + "OBJ_88" + ); + name = "Struct"; + path = "Struct"; + sourceTree = ""; + }; + "OBJ_85" = { + isa = "PBXFileReference"; + path = "StructWithAutowired.swift"; + sourceTree = ""; + }; + "OBJ_86" = { + isa = "PBXFileReference"; + path = "StructWithAutowiredFactory.swift"; + sourceTree = ""; + }; + "OBJ_87" = { + isa = "PBXFileReference"; + path = "StructWithComponent.swift"; + sourceTree = ""; + }; + "OBJ_88" = { + isa = "PBXFileReference"; + path = "StructWithLazyAutowired.swift"; + sourceTree = ""; + }; + "OBJ_89" = { + isa = "PBXFileReference"; + path = "TestDeliFactory.swift"; + sourceTree = ""; + }; + "OBJ_9" = { + isa = "PBXFileReference"; + path = "Autowired.swift"; + sourceTree = ""; + }; + "OBJ_90" = { + isa = "PBXFileReference"; + path = "TestDeliObject.swift"; + sourceTree = ""; + }; + "OBJ_91" = { + isa = "PBXFileReference"; + path = "TestNotRegister.swift"; + sourceTree = ""; + }; + "OBJ_92" = { + isa = "PBXFileReference"; + path = "TestPayload.swift"; + sourceTree = ""; + }; + "OBJ_93" = { + isa = "PBXFileReference"; + path = "TestRegister.swift"; + sourceTree = ""; + }; + "OBJ_94" = { + isa = "PBXFileReference"; + path = "TestService.swift"; + sourceTree = ""; + }; + "OBJ_95" = { + isa = "PBXFileReference"; + path = "TestView1.swift"; + sourceTree = ""; + }; + "OBJ_96" = { + isa = "PBXFileReference"; + path = "TestView2.swift"; + sourceTree = ""; + }; + "OBJ_97" = { + isa = "PBXFileReference"; + path = "TestView3.swift"; + sourceTree = ""; + }; + "OBJ_98" = { + isa = "PBXFileReference"; + path = "TestViewModel.swift"; + sourceTree = ""; + }; + "OBJ_99" = { + isa = "PBXFileReference"; + path = "UnicodeTest.swift"; + sourceTree = ""; + }; + "Quick::Quick" = { + isa = "PBXNativeTarget"; + buildConfigurationList = "OBJ_400"; + buildPhases = ( + "OBJ_403", + "OBJ_427" + ); + dependencies = ( + "OBJ_429" + ); + name = "Quick"; + productName = "Quick"; + productReference = "Quick::Quick::Product"; + productType = "com.apple.product-type.framework"; + }; + "Quick::Quick::Product" = { + isa = "PBXFileReference"; + path = "Quick.framework"; + sourceTree = "BUILT_PRODUCTS_DIR"; + }; + "Quick::QuickSpecBase" = { + isa = "PBXNativeTarget"; + buildConfigurationList = "OBJ_436"; + buildPhases = ( + "OBJ_439", + "OBJ_441", + "OBJ_443" + ); + dependencies = ( + ); + name = "QuickSpecBase"; + productName = "QuickSpecBase"; + productReference = "Quick::QuickSpecBase::Product"; + productType = "com.apple.product-type.framework"; + }; + "Quick::QuickSpecBase::Product" = { + isa = "PBXFileReference"; + path = "QuickSpecBase.framework"; + sourceTree = "BUILT_PRODUCTS_DIR"; + }; + "Quick::SwiftPMPackageDescription" = { + isa = "PBXNativeTarget"; + buildConfigurationList = "OBJ_431"; + buildPhases = ( + "OBJ_434" + ); + dependencies = ( + ); + name = "QuickPackageDescription"; + productName = "QuickPackageDescription"; + productType = "com.apple.product-type.framework"; + }; + }; + rootObject = "OBJ_1"; } diff --git a/Deli.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Deli.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..026c732 --- /dev/null +++ b/Deli.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,124 @@ +{ + "object": { + "pins": [ + { + "package": "AEXML", + "repositoryURL": "https://github.com/tadija/AEXML", + "state": { + "branch": null, + "revision": "e4d517844dd03dac557e35d77a8e9ab438de91a6", + "version": "4.4.0" + } + }, + { + "package": "Commandant", + "repositoryURL": "https://github.com/Carthage/Commandant.git", + "state": { + "branch": null, + "revision": "ab68611013dec67413628ac87c1f29e8427bc8e4", + "version": "0.17.0" + } + }, + { + "package": "CwlCatchException", + "repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git", + "state": { + "branch": null, + "revision": "7cd2f8cacc4d22f21bc0b2309c3b18acf7957b66", + "version": "1.2.0" + } + }, + { + "package": "CwlPreconditionTesting", + "repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git", + "state": { + "branch": null, + "revision": "c228db5d2ad1b01ebc84435e823e6cca4e3db98b", + "version": "1.2.0" + } + }, + { + "package": "Nimble", + "repositoryURL": "https://github.com/Quick/Nimble.git", + "state": { + "branch": null, + "revision": "b02b00b30b6353632aa4a5fb6124f8147f7140c0", + "version": "8.0.5" + } + }, + { + "package": "PathKit", + "repositoryURL": "https://github.com/kylef/PathKit", + "state": { + "branch": null, + "revision": "73f8e9dca9b7a3078cb79128217dc8f2e585a511", + "version": "1.0.0" + } + }, + { + "package": "Quick", + "repositoryURL": "https://github.com/Quick/Quick.git", + "state": { + "branch": null, + "revision": "33682c2f6230c60614861dfc61df267e11a1602f", + "version": "2.2.0" + } + }, + { + "package": "Regex", + "repositoryURL": "https://github.com/crossroadlabs/Regex.git", + "state": { + "branch": null, + "revision": "166728756082a9cac6e4aed3ebbce8e41cb3a945", + "version": "1.2.0" + } + }, + { + "package": "SourceKitten", + "repositoryURL": "https://github.com/jpsim/SourceKitten.git", + "state": { + "branch": null, + "revision": "97b5848e5692150d75b5cf0b81d7ebef5f4d5071", + "version": "0.28.0" + } + }, + { + "package": "Spectre", + "repositoryURL": "https://github.com/kylef/Spectre.git", + "state": { + "branch": null, + "revision": "f14ff47f45642aa5703900980b014c2e9394b6e5", + "version": "0.9.0" + } + }, + { + "package": "SWXMLHash", + "repositoryURL": "https://github.com/drmohundro/SWXMLHash.git", + "state": { + "branch": null, + "revision": "a4931e5c3bafbedeb1601d3bb76bbe835c6d475a", + "version": "5.0.1" + } + }, + { + "package": "XcodeProj", + "repositoryURL": "https://github.com/tuist/xcodeproj.git", + "state": { + "branch": null, + "revision": "23f7e12a7e0db29b4f16052692d99f9fbe41fa15", + "version": "7.5.0" + } + }, + { + "package": "Yams", + "repositoryURL": "https://github.com/jpsim/Yams.git", + "state": { + "branch": null, + "revision": "c947a306d2e80ecb2c0859047b35c73b8e1ca27f", + "version": "2.0.0" + } + } + ] + }, + "version": 1 +} diff --git a/Deli.xcodeproj/xcshareddata/xcschemes/Deli-Package.xcscheme b/Deli.xcodeproj/xcshareddata/xcschemes/Deli-Package.xcscheme index 97ee32e..542482b 100644 --- a/Deli.xcodeproj/xcshareddata/xcschemes/Deli-Package.xcscheme +++ b/Deli.xcodeproj/xcshareddata/xcschemes/Deli-Package.xcscheme @@ -1,81 +1,33 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - + + + + diff --git a/Design/Deli.sketch b/Design/Deli.sketch new file mode 100644 index 0000000..3472081 Binary files /dev/null and b/Design/Deli.sketch differ diff --git a/Examples/GitHubSearch/Deli.resolved b/Examples/GitHubSearch/Deli.resolved new file mode 100644 index 0000000..6343494 --- /dev/null +++ b/Examples/GitHubSearch/Deli.resolved @@ -0,0 +1,37 @@ +VERSION: 0.8.1 +DEPENDENCY: +- TYPE: GitHubServiceImpl + LAZILY: false + FACTORY: false + VALUE_TYPE: false + DEPENDENCY: + - TYPE: NetworkManager + QUALIFIER: + LINK: + - GitHubService +- TYPE: NetworkManagerImpl + LAZILY: false + FACTORY: false + VALUE_TYPE: false + DEPENDENCY: [] + LINK: + - NetworkManager +- TYPE: ViewController + LAZILY: false + FACTORY: false + VALUE_TYPE: false + DEPENDENCY: + - TYPE: ViewModel + QUALIFIER: + LINK: [] +- TYPE: ViewModel + LAZILY: false + FACTORY: false + VALUE_TYPE: false + DEPENDENCY: + - TYPE: GitHubService + QUALIFIER: + LINK: [] +PROPERTY: {} +PROJECT: GitHubSearch +REFERENCE: GitHubSearch diff --git a/Examples/Survey/Deli.resolved b/Examples/Survey/Deli.resolved new file mode 100644 index 0000000..bb97e4e --- /dev/null +++ b/Examples/Survey/Deli.resolved @@ -0,0 +1,56 @@ +VERSION: 0.8.1 +DEPENDENCY: +- TYPE: SurveyServiceImpl + LAZILY: false + FACTORY: false + VALUE_TYPE: false + DEPENDENCY: + - TYPE: Survey + QUALIFIER: + LINK: + - SurveyService +- TYPE: TestSurvey1 + QUALIFIER: Survey1 + LAZILY: false + FACTORY: false + VALUE_TYPE: false + DEPENDENCY: [] + LINK: + - Survey +- TYPE: TestSurvey2 + QUALIFIER: Survey2 + LAZILY: false + FACTORY: false + VALUE_TYPE: false + DEPENDENCY: [] + LINK: + - Survey +- TYPE: TestSurvey3 + QUALIFIER: Survey3 + LAZILY: false + FACTORY: false + VALUE_TYPE: false + DEPENDENCY: [] + LINK: + - Survey +- TYPE: ViewController + LAZILY: false + FACTORY: false + VALUE_TYPE: false + DEPENDENCY: + - TYPE: Survey + QUALIFIER: Survey3 + - TYPE: ViewModel + QUALIFIER: + LINK: [] +- TYPE: ViewModel + LAZILY: false + FACTORY: false + VALUE_TYPE: false + DEPENDENCY: + - TYPE: SurveyService + QUALIFIER: + LINK: [] +PROPERTY: {} +PROJECT: Survey +REFERENCE: Survey/SurveyFactory.swift diff --git a/Package.resolved b/Package.resolved index d8136f8..a19ff6b 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,8 +6,8 @@ "repositoryURL": "https://github.com/Quick/Nimble.git", "state": { "branch": null, - "revision": "cd6dfb86f496fcd96ce0bc6da962cd936bf41903", - "version": "7.3.1" + "revision": "f8657642dfdec9973efc79cc68bcef43a653a2bc", + "version": "8.0.2" } }, { @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/Quick/Quick.git", "state": { "branch": null, - "revision": "5fbf13871d185526993130c3a1fad0b70bfe37ce", - "version": "1.3.2" + "revision": "33682c2f6230c60614861dfc61df267e11a1602f", + "version": "2.2.0" } } ] diff --git a/Package.swift b/Package.swift index fa61436..407d227 100644 --- a/Package.swift +++ b/Package.swift @@ -1,14 +1,20 @@ -// swift-tools-version:4.0 +// swift-tools-version:5.0 import PackageDescription let package = Package( name: "Deli", + platforms: [ + .iOS(.v8), + .macOS(.v10_10), + .tvOS(.v9), + .watchOS(.v2) + ], products: [ .library(name: "Deli", targets: ["Deli"]) ], dependencies: [ - .package(url: "https://github.com/Quick/Quick.git", from: "1.3.1"), - .package(url: "https://github.com/Quick/Nimble.git", from: "7.3.0") + .package(url: "https://github.com/Quick/Quick.git", .exact("2.2.0")), + .package(url: "https://github.com/Quick/Nimble.git", .exact("8.0.2")) ], targets: [ .target( @@ -26,5 +32,5 @@ let package = Package( path: "Tests/DeliTests" ) ], - swiftLanguageVersions: [3, 4] + swiftLanguageVersions: [.v4, .v4_2, .v5] ) diff --git a/Package@swift-4.0.swift b/Package@swift-4.0.swift new file mode 100644 index 0000000..fa61436 --- /dev/null +++ b/Package@swift-4.0.swift @@ -0,0 +1,30 @@ +// swift-tools-version:4.0 +import PackageDescription + +let package = Package( + name: "Deli", + products: [ + .library(name: "Deli", targets: ["Deli"]) + ], + dependencies: [ + .package(url: "https://github.com/Quick/Quick.git", from: "1.3.1"), + .package(url: "https://github.com/Quick/Nimble.git", from: "7.3.0") + ], + targets: [ + .target( + name: "Deli", + dependencies: [], + path: "Sources/Deli" + ), + .testTarget( + name: "DeliTests", + dependencies: [ + "Deli", + "Quick", + "Nimble" + ], + path: "Tests/DeliTests" + ) + ], + swiftLanguageVersions: [3, 4] +) diff --git a/README.md b/README.md index 8dee2eb..194a0b4 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,9 @@ Deli is an easy-to-use Dependency Injection Container that creates DI containers - [Group Value](#92-group-value) - [Single Value](#93-single-value) - [Qualifier by Property](#94-qualifier-by-property) + - [Property Wrapper](#10-propertywrapper) + - [Dependency](#101-dependecy) + - [PropertyValue](#102-propertyvalue) * [Installation](#installation) - [Cocoapods](#cocoapods) - [Carthage](#carthage) @@ -79,6 +82,13 @@ config: - Exclude files... className: DeilFactory output: Sources/DeliFactory.swift + resolve: + output: Deli.resolved + generate: true + dependencies: + - path: Resolved files... + imports: UIKit + accessControl: public ``` You’ll have to make your scheme `Shared`. To do this `Manage Schemes` and check the `Shared` areas: @@ -656,7 +666,7 @@ struct ServerConfig: ConfigProperty { let target: String = "server" let url: String - let isDebug: String + let isDebug: Bool } ``` @@ -676,24 +686,6 @@ final class NetworkManager: Autowired { } ``` -By default, the `ConfigProperty`'s property can only be used as String type. So `isDebug` must be set String type, even though it is true or false. - -In this case, you can implement the constructor that change to another type as below: - -```swift -struct ServerConfig: ConfigProperty { - let target: String = "server" - - let url: String - let isDebug: Bool - - init(url: String, isDebug: String) { - self.url = url - self.isDebug = (isDebug == "true" ? true : false) - } -} -``` - #### 9.3. Single Value @@ -714,7 +706,7 @@ In this case, recommend using the `AppContext#getProperty()` method. ```swift final class NetworkManager { - let serverUrl = AppContext.getProperty("server.url") ?? "https://wtf.example.com" + let serverUrl = AppContext.getProperty("server.url", type: String.self) ?? "https://wtf.example.com" } ``` @@ -749,6 +741,43 @@ final class UserService: Inject { +### 10. PropertyWrapper + +For easier use, supports the [@propertyWrapper](https://github.com/apple/swift-evolution/blob/master/proposals/0258-property-wrappers.md) added in Swift 5.1. + +There are two main features to be supported: dependency injection and [Configuration Property](#9-configuration-property). + + + +#### 10.1. Dependency + +There are `@Dependency` and `@DependencyArray` for injection of dependencies. + +```swift +class Library { + @Dependency(qualifier "logger.storage") + var logger: Logger + + @DependencyArray(qualifier: "novel") + var novels: [Book] +} +``` + + + +#### 10.2. PropertyValue + +`@PropertyValue` is the same as [Configuration Property](#9-configuration-property) and the usage as below: + +```swift +final class NetworkManager: Inject { + @PropertyValue("server.url") + let serverUrl: String +} +``` + + + ## Installation ### [Cocoapods](https://cocoapods.org/): diff --git a/README_KR.md b/README_KR.md index c1445cf..518fb2c 100644 --- a/README_KR.md +++ b/README_KR.md @@ -37,6 +37,9 @@ Deli는 쉽게 사용할 수 있는 DI Container 프로젝트입니다. - [묶음 값](#92-묶음-값) - [단일 값](#93-단일-값) - [프로퍼티에 의한 주입](#94-프로퍼티에-의한-주입) + - [Property Wrapper](#10-propertywrapper) + - [Dependency](#101-dependecy) + - [PropertyValue](#102-propertyvalue) * [설치 방법](#설치-방법) - [Cocoapods](#cocoapods) - [Carthage](#carthage) @@ -78,6 +81,13 @@ config: - 제외할 파일들... className: DeilFactory output: Sources/DeliFactory.swift + resolve: + output: Deli.resolved + generate: true + dependencies: + - path: Resolved 파일들... + imports: UIKit + accessControl: public ``` 당신이 지정한 빌드 Scheme은 `Shared`로 설정되어야 합니다. Xcode의 `Manage Scheme`에서 `Shared` 영역을 확인합시다: @@ -652,7 +662,7 @@ struct ServerConfig: ConfigProperty { let target: String = "server" let url: String - let isDebug: String + let isDebug: Bool } ``` @@ -672,24 +682,6 @@ final class NetworkManager: Autowired { } ``` -기본적으로 `ConfigProperty`의 프로퍼티는 오직 String 타입으로만 사용할 수 있습니다. 그래서 `isDebug`의 값은 true, false임에도 불구하고 String으로 지정할 수 밖에 없습니다. - -이런 경우에는 다음과 같이 생성자를 구현해서 다른 타입으로 변경할 수 있습니다. - -```swift -struct ServerConfig: ConfigProperty { - let target: String = "server" - - let url: String - let isDebug: Bool - - init(url: String, isDebug: String) { - self.url = url - self.isDebug = (isDebug == "true" ? true : false) - } -} -``` - #### 9.3. 단일 값 @@ -710,7 +702,7 @@ final class NetworkManager: Inject { ```swift final class NetworkManager { - let serverUrl = AppContext.getProperty("server.url") ?? "https://wtf.example.com" + let serverUrl = AppContext.getProperty("server.url", type: String.self) ?? "https://wtf.example.com" } ``` @@ -745,6 +737,43 @@ final class UserService: Inject { +### 10. PropertyWrapper + +좀 더 간편한 사용을 위해 Swift 5.1에 추가된 [@propertyWrapper](https://github.com/apple/swift-evolution/blob/master/proposals/0258-property-wrappers.md)를 지원합니다. + +지원하는 기능은 크게 두 가지가 있는데, 의존성을 주입받는 것과 [Configuration Property](#9-configuration-property)를 주입받는 것 두 가지입니다. + + + +#### 10.1. Dependency + +의존성에 대한 주입은 크게 `@Dependency`와 `@DependencyArray`로 나눠집니다. + +```swift +class Library { + @Dependency(qualifier "logger.storage") + var logger: Logger + + @DependencyArray(qualifier: "novel") + var novels: [Book] +} +``` + + + +#### 10.2. PropertyValue + +`@PropertyValue`는 [Configuration Property](#9-configuration-property)와 동일하며 사용법은 아래와 같습니다. + +```swift +final class NetworkManager: Inject { + @PropertyValue("server.url") + let serverUrl: String +} +``` + + + ## 설치 방법 ### [Cocoapods](https://cocoapods.org/): diff --git a/Sources/Deli/Autowired.swift b/Sources/Deli/Autowired.swift index a59751f..28de870 100644 --- a/Sources/Deli/Autowired.swift +++ b/Sources/Deli/Autowired.swift @@ -3,7 +3,7 @@ // Deli // -/// The `Autowired` protocol is registered automatically, and load the +/// The Autowired protocol is registered automatically, and load the /// required dependencies from IoC container. public protocol Autowired: Inject { /// Associated type for dependency 1. @@ -70,8 +70,8 @@ public protocol Autowired: Inject { } public extension Autowired { - public var qualifier: String? { return nil } - public var scope: Scope { return .singleton } + var qualifier: String? { return nil } + var scope: Scope { return .singleton } init(_ dep1: Dep1) { self.init(dep1) diff --git a/Sources/Deli/AutowiredFactory.swift b/Sources/Deli/AutowiredFactory.swift index 58371f2..005c937 100644 --- a/Sources/Deli/AutowiredFactory.swift +++ b/Sources/Deli/AutowiredFactory.swift @@ -85,8 +85,8 @@ public protocol AutowiredFactory: Factory { } public extension AutowiredFactory { /// To supports type-inference of the compiler. - public var payloadType: _Payload.Type { return _Payload.self } - public var qualifier: String? { return nil } + var payloadType: _Payload.Type { return _Payload.self } + var qualifier: String? { return nil } init(payload: _Payload) { self.init(payload: payload) diff --git a/Sources/Deli/Component.swift b/Sources/Deli/Component.swift index 1219c76..e041dbc 100644 --- a/Sources/Deli/Component.swift +++ b/Sources/Deli/Component.swift @@ -15,6 +15,6 @@ public protocol Component: Inject { var scope: Scope { get } } public extension Component { - public var qualifier: String? { return nil } - public var scope: Scope { return .singleton } + var qualifier: String? { return nil } + var scope: Scope { return .singleton } } diff --git a/Sources/Deli/Configuration.swift b/Sources/Deli/Configuration.swift index d8c293a..4cd1bb8 100644 --- a/Sources/Deli/Configuration.swift +++ b/Sources/Deli/Configuration.swift @@ -18,7 +18,7 @@ public extension Configuration { /// dependencies of the type. /// It is invoked when needs to instantiate the instance. /// - Returns: The closure that resolve dependency type. - public static func Config( + static func Config( _ type: T.Type, qualifier: String = "", scope: Scope = .singleton, @@ -44,7 +44,7 @@ public extension Configuration { /// dependencies of the type. /// It is invoked when needs to instantiate the instance. /// - Returns: The closure that resolve dependency type. - public static func Config( + static func Config( _ type: T.Type, _ dependency1: Dep1.Type, qualifier: String = "", @@ -73,7 +73,7 @@ public extension Configuration { /// dependencies of the type. /// It is invoked when needs to instantiate the instance. /// - Returns: The closure that resolve dependency type. - public static func Config( + static func Config( _ type: T.Type, _ dependency1: Dep1.Type, _ dependency2: Dep2.Type, @@ -105,7 +105,7 @@ public extension Configuration { /// dependencies of the type. /// It is invoked when needs to instantiate the instance. /// - Returns: The closure that resolve dependency type. - public static func Config( + static func Config( _ type: T.Type, _ dependency1: Dep1.Type, _ dependency2: Dep2.Type, @@ -140,7 +140,7 @@ public extension Configuration { /// dependencies of the type. /// It is invoked when needs to instantiate the instance. /// - Returns: The closure that resolve dependency type. - public static func Config( + static func Config( _ type: T.Type, _ dependency1: Dep1.Type, _ dependency2: Dep2.Type, @@ -178,7 +178,7 @@ public extension Configuration { /// dependencies of the type. /// It is invoked when needs to instantiate the instance. /// - Returns: The closure that resolve dependency type. - public static func Config( + static func Config( _ type: T.Type, _ dependency1: Dep1.Type, _ dependency2: Dep2.Type, @@ -219,7 +219,7 @@ public extension Configuration { /// dependencies of the type. /// It is invoked when needs to instantiate the instance. /// - Returns: The closure that resolve dependency type. - public static func Config( + static func Config( _ type: T.Type, _ dependency1: Dep1.Type, _ dependency2: Dep2.Type, @@ -263,7 +263,7 @@ public extension Configuration { /// dependencies of the type. /// It is invoked when needs to instantiate the instance. /// - Returns: The closure that resolve dependency type. - public static func Config( + static func Config( _ type: T.Type, _ dependency1: Dep1.Type, _ dependency2: Dep2.Type, @@ -310,7 +310,7 @@ public extension Configuration { /// dependencies of the type. /// It is invoked when needs to instantiate the instance. /// - Returns: The closure that resolve dependency type. - public static func Config( + static func Config( _ type: T.Type, _ dependency1: Dep1.Type, _ dependency2: Dep2.Type, @@ -360,7 +360,7 @@ public extension Configuration { /// dependencies of the type. /// It is invoked when needs to instantiate the instance. /// - Returns: The closure that resolve dependency type. - public static func Config( + static func Config( _ type: T.Type, _ dependency1: Dep1.Type, _ dependency2: Dep2.Type, diff --git a/Sources/Deli/Core/AppContext.swift b/Sources/Deli/Core/AppContext.swift index 4e95858..db4534d 100644 --- a/Sources/Deli/Core/AppContext.swift +++ b/Sources/Deli/Core/AppContext.swift @@ -36,7 +36,55 @@ public class AppContext { private let lock = NSRecursiveLock() private var loadedList: [LoadInfo] = [] - + + private let propertyContainer = Container() + + private func getClassFromString(_ className: String) -> AnyClass? { + if let classType = NSClassFromString(className) { + return classType + } + for bundle in Bundle.allBundles.reversed() { + guard let appName = bundle.object(forInfoDictionaryKey: "CFBundleName") as? String else { continue } + + let newAppName = appName.replacingOccurrences(of: " ", with: "_", options: .literal, range: nil) + if let classType = NSClassFromString("\(newAppName).\(className)") { + return classType + } + } + return nil + } + + private func load(_ factories: [ModuleFactory], priority: LoadPriority) { + lock.lock() + defer { lock.unlock() } + + /// Duplicated load + let factories = factories + .filter { factory in + !loadedList.contains(where: { $0.factory === factory }) + } + + /// Load factory + factories.forEach { factory in + factory.load(context: self) + loadedList.append( + LoadInfo( + factory: factory, + priority: priority + ) + ) + } + + /// Update loaded list + loadedList.sort { (a, b) in + guard a.priority.rawValue < b.priority.rawValue else { return true } + return a.loadedAt < b.loadedAt + } + + /// Load container + factories.forEach { $0.container.load() } + } + // MARK: - Public /// Get container components. @@ -56,9 +104,7 @@ public class AppContext { /// - Returns: Instance of shared application context. @discardableResult public func load(_ factories: [ModuleFactory.Type], priority: LoadPriority = .normal) -> AppContext { - for type in factories { - load(type.init(), priority: priority) - } + load(factories.map { $0.init() }, priority: priority) return self } @@ -70,24 +116,7 @@ public class AppContext { /// - Returns: Instance of shared application context. @discardableResult public func load(_ factory: ModuleFactory, priority: LoadPriority = .normal) -> AppContext { - lock.lock() - defer { lock.unlock() } - - /// Duplicated load - guard !loadedList.contains(where: { $0.factory === factory }) else { return self } - - factory.load(context: self) - loadedList.append( - LoadInfo( - factory: factory, - priority: priority - ) - ) - loadedList.sort { (a, b) in - guard a.priority.rawValue < b.priority.rawValue else { return true } - return a.loadedAt < b.loadedAt - } - factory.container.load() + load([factory], priority: priority) return self } @@ -124,7 +153,86 @@ public class AppContext { public func reset() { loadedList.forEach { $0.factory.reset() } } - + + /// Get instance from string class. + /// + /// - Parameters: + /// - type: The dependency type to resolve. + /// - className: The dependency class name to resolve. + /// - qualifier: The registered qualifier. + /// - resolveRole: The resolve role(default: recursive) + /// - Returns: The resolved instance, or nil. + public func get( + _ type: T.Type, + className: String, + qualifier: String = "", + resolveRole: ResolveRole = .recursive + ) -> T? { + guard let classInfo = getClassFromString(className) else { return nil } + let key = TypeKey(type: classInfo, qualifier: qualifier) + + let list = resolveRole.findModules(loadedList.map { $0.factory }) + for factory in list { + guard let instance = try? factory.container.get(key) else { continue } + guard let result = instance as? T else { continue } + return result + } + return nil + } + + /// Get instance from string class by factory. + /// + /// - Parameters: + /// - type: The dependency type to resolve. + /// - className: The dependency class name to resolve. + /// - payload: User data for resolve. + /// - resolveRole: The resolve role(default: recursive) + /// - Returns: The resolved instance, or nil. + public func get( + _ type: T.Type, + className: String, + payload: T.RawPayload, + resolveRole: ResolveRole = .recursive + ) -> T? { + guard let classInfo = getClassFromString(className) else { return nil } + let key = TypeKey(type: classInfo, qualifier: "") + + let list = resolveRole.findModules(loadedList.map { $0.factory }) + for factory in list { + guard let instance = try? factory.container.get(key, payload: payload) else { continue } + guard let result = instance as? T else { continue } + return result + } + return nil + } + + /// Get instance from string class without resolve. + /// It is used to avoid repetitive resolve if already registered. + /// + /// - Parameters: + /// - type: The dependency type to resolve. + /// - className: The dependency class name to resolve. + /// - qualifier: The registered qualifier. + /// - resolveRole: The resolve role(default: recursive) + /// - Returns: The resolved instances, or nil. + public func get( + withoutResolve type: T.Type, + className: String, + qualifier: String, + resolveRole: ResolveRole = .recursive + ) -> T? { + guard let classInfo = getClassFromString(className) else { return nil } + let key = TypeKey(type: classInfo, qualifier: qualifier) + + let list = resolveRole.findModules(loadedList.map { $0.factory }) + for factory in list { + guard let instance = try? factory.container.get(withoutResolve: key) else { continue } + guard let result = instance as? T else { continue } + return result + } + return nil + } + /// Get instance for type. /// /// - Parameters: @@ -135,7 +243,7 @@ public class AppContext { public func get( _ type: T.Type, qualifier: String = "", - resolveRole: ResolveRule = .recursive + resolveRole: ResolveRole = .recursive ) -> T? { let key = TypeKey(type: type, qualifier: qualifier) @@ -158,7 +266,7 @@ public class AppContext { public func get( _ type: [T].Type, qualifier: String = "", - resolveRole: ResolveRule = .default + resolveRole: ResolveRole = .default ) -> [T] { let key = TypeKey(type: T.self, qualifier: qualifier) @@ -178,7 +286,7 @@ public class AppContext { public func get( _ type: T.Type, payload: T.RawPayload, - resolveRole: ResolveRule = .recursive + resolveRole: ResolveRole = .recursive ) -> T? { let key = TypeKey(type: type, qualifier: "") @@ -201,7 +309,7 @@ public class AppContext { public func get( _ type: [T].Type, payload: T.RawPayload, - resolveRole: ResolveRule = .default + resolveRole: ResolveRole = .default ) -> [T] { let key = TypeKey(type: T.self, qualifier: "") @@ -222,7 +330,7 @@ public class AppContext { public func get( withoutResolve type: T.Type, qualifier: String, - resolveRole: ResolveRule = .recursive + resolveRole: ResolveRole = .recursive ) -> T? { let key = TypeKey(type: type, qualifier: qualifier) @@ -246,7 +354,7 @@ public class AppContext { public func get( withoutResolve type: [T].Type, qualifier: String, - resolveRole: ResolveRule = .default + resolveRole: ResolveRole = .default ) -> [T] { let key = TypeKey(type: T.self, qualifier: qualifier) @@ -256,16 +364,33 @@ public class AppContext { .compactMap { $0 as? T } } - /// Get property using the path. + /// Load common property. + /// + /// - Parameters: + /// - properties: Properties. + public func loadProperty(_ properties: [String: Any]) { + lock.lock() + defer { lock.unlock() } + + propertyContainer.unloadProperty() + propertyContainer.loadProperty(properties) + } + + /// Get property. /// /// - Parameters: /// - path: Property path. /// - resolveRole: The resolve role. /// - Returns: The property. - public func getProperty( - _ path: String, - resolveRole: ResolveRule = .default - ) -> Any? { + public func getProperty(_ path: String, resolveRole: ResolveRole = .default) -> Any? { + do { + if let property = try propertyContainer.getProperty(path) { + return property + } + } catch let error { + print(error) + } + let list = resolveRole.findModules(loadedList.map { $0.factory }) for factory in list { do { @@ -277,6 +402,190 @@ public class AppContext { } return nil } + + /// Get property of String type. + /// + /// - Parameters: + /// - path: Property path. + /// - type: Property type. + /// - resolveRole: The resolve role. + /// - Returns: The property. + public func getProperty(_ path: String, type: String.Type, resolveRole: ResolveRole = .default) -> String? { + return AppContext.shared.getProperty(path, resolveRole: resolveRole) as? String + } + + /// Get property of Bool type. + /// + /// - Parameters: + /// - path: Property path. + /// - type: Property type. + /// - resolveRole: The resolve role. + /// - Returns: The property. + public func getProperty(_ path: String, type: Bool.Type, resolveRole: ResolveRole = .default) -> Bool? { + guard let property = getProperty(path, type: String.self, resolveRole: resolveRole) else { return nil } + if let result = Bool(property) { + return result + } + if let result = Int(property) { + return result == 1 + } + return nil + } + + /// Get property of Double type. + /// + /// - Parameters: + /// - path: Property path. + /// - type: Property type. + /// - resolveRole: The resolve role. + /// - Returns: The property. + public func getProperty(_ path: String, type: Double.Type, resolveRole: ResolveRole = .default) -> Double? { + guard let property = getProperty(path, type: String.self, resolveRole: resolveRole) else { return nil } + return Double(property) + } + + /// Get property of Float type. + /// + /// - Parameters: + /// - path: Property path. + /// - type: Property type. + /// - resolveRole: The resolve role. + /// - Returns: The property. + public func getProperty(_ path: String, type: Float.Type, resolveRole: ResolveRole = .default) -> Float? { + guard let property = getProperty(path, type: String.self, resolveRole: resolveRole) else { return nil } + return Float(property) + } + + /// Get property of Int type. + /// + /// - Parameters: + /// - path: Property path. + /// - type: Property type. + /// - resolveRole: The resolve role. + /// - Returns: The property. + public func getProperty(_ path: String, type: Int.Type, resolveRole: ResolveRole = .default) -> Int? { + guard let property = getProperty(path, type: String.self, resolveRole: resolveRole) else { return nil } + return Int(property) + } + + /// Get property of Int8 type. + /// + /// - Parameters: + /// - path: Property path. + /// - type: Property type. + /// - resolveRole: The resolve role. + /// - Returns: The property. + public func getProperty(_ path: String, type: Int8.Type, resolveRole: ResolveRole = .default) -> Int8? { + guard let property = getProperty(path, type: String.self, resolveRole: resolveRole) else { return nil } + return Int8(property) + } + + /// Get property of Int16 type. + /// + /// - Parameters: + /// - path: Property path. + /// - type: Property type. + /// - resolveRole: The resolve role. + /// - Returns: The property. + public func getProperty(_ path: String, type: Int16.Type, resolveRole: ResolveRole = .default) -> Int16? { + guard let property = getProperty(path, type: String.self, resolveRole: resolveRole) else { return nil } + return Int16(property) + } + + /// Get property of Int32 type. + /// + /// - Parameters: + /// - path: Property path. + /// - type: Property type. + /// - resolveRole: The resolve role. + /// - Returns: The property. + public func getProperty(_ path: String, type: Int32.Type, resolveRole: ResolveRole = .default) -> Int32? { + guard let property = getProperty(path, type: String.self, resolveRole: resolveRole) else { return nil } + return Int32(property) + } + + /// Get property of Int64 type. + /// + /// - Parameters: + /// - path: Property path. + /// - type: Property type. + /// - resolveRole: The resolve role. + /// - Returns: The property. + public func getProperty(_ path: String, type: Int64.Type, resolveRole: ResolveRole = .default) -> Int64? { + guard let property = getProperty(path, type: String.self, resolveRole: resolveRole) else { return nil } + return Int64(property) + } + + /// Get property of UInt type. + /// + /// - Parameters: + /// - path: Property path. + /// - type: Property type. + /// - resolveRole: The resolve role. + /// - Returns: The property. + public func getProperty(_ path: String, type: UInt.Type, resolveRole: ResolveRole = .default) -> UInt? { + guard let property = getProperty(path, type: String.self, resolveRole: resolveRole) else { return nil } + return UInt(property) + } + + /// Get property of UInt8 type. + /// + /// - Parameters: + /// - path: Property path. + /// - type: Property type. + /// - resolveRole: The resolve role. + /// - Returns: The property. + public func getProperty(_ path: String, type: UInt8.Type, resolveRole: ResolveRole = .default) -> UInt8? { + guard let property = getProperty(path, type: String.self, resolveRole: resolveRole) else { return nil } + return UInt8(property) + } + + /// Get property of UInt16 type. + /// + /// - Parameters: + /// - path: Property path. + /// - type: Property type. + /// - resolveRole: The resolve role. + /// - Returns: The property. + public func getProperty(_ path: String, type: UInt16.Type, resolveRole: ResolveRole = .default) -> UInt16? { + guard let property = getProperty(path, type: String.self, resolveRole: resolveRole) else { return nil } + return UInt16(property) + } + + /// Get property of UInt32 type. + /// + /// - Parameters: + /// - path: Property path. + /// - type: Property type. + /// - resolveRole: The resolve role. + /// - Returns: The property. + public func getProperty(_ path: String, type: UInt32.Type, resolveRole: ResolveRole = .default) -> UInt32? { + guard let property = getProperty(path, type: String.self, resolveRole: resolveRole) else { return nil } + return UInt32(property) + } + + /// Get property of UInt64 type. + /// + /// - Parameters: + /// - path: Property path. + /// - type: Property type. + /// - resolveRole: The resolve role. + /// - Returns: The property. + public func getProperty(_ path: String, type: UInt64.Type, resolveRole: ResolveRole = .default) -> UInt64? { + guard let property = getProperty(path, type: String.self, resolveRole: resolveRole) else { return nil } + return UInt64(property) + } + + /// Get property of ConfigProperty type. + /// + /// - Parameters: + /// - path: Property path. + /// - type: Property type inherit ConfigProperty. + /// - resolveRole: The resolve role. + /// - Returns: The property. + public func getProperty(_ path: String, type: T.Type, resolveRole: ResolveRole = .default) -> T? { + return get(type, qualifier: "", resolveRole: resolveRole) + } // MARK: - Lifecycle diff --git a/Sources/Deli/Core/Container.swift b/Sources/Deli/Core/Container.swift index be40888..28ec484 100644 --- a/Sources/Deli/Core/Container.swift +++ b/Sources/Deli/Core/Container.swift @@ -172,11 +172,17 @@ final class Container: ContainerType { return oldTarget[key] } } + func unloadProperty() { + lock.lock() + defer { lock.unlock() } + + loadedProperty = [:] + } func loadProperty(_ properties: [String: Any]) { lock.lock() defer { lock.unlock() } - loadedProperty.merge(properties) { $1 } + loadedProperty = merge(loadedProperty, properties) } func register(_ key: TypeKey, component: _ContainerComponent) { lock.lock() @@ -277,4 +283,28 @@ final class Container: ContainerType { return component.weakCache } } + + private func merge(_ origin: [String: Any], _ target: [String: Any]) -> [String: Any] { + guard !origin.isEmpty else { return target } + guard !target.isEmpty else { return origin } + + var newDict = origin + + for (key, value) in target { + guard let oldValue = newDict[key] else { + newDict[key] = value + continue + } + + /// Dictionary + if let oldDict = oldValue as? [String: Any], let dict = value as? [String: Any] { + newDict[key] = merge(oldDict, dict) + continue + } + + newDict[key] = value + } + + return newDict + } } diff --git a/Sources/Deli/Core/Type/ResolveRule.swift b/Sources/Deli/Core/Type/ResolveRole.swift similarity index 88% rename from Sources/Deli/Core/Type/ResolveRule.swift rename to Sources/Deli/Core/Type/ResolveRole.swift index 65e6c26..967e462 100644 --- a/Sources/Deli/Core/Type/ResolveRule.swift +++ b/Sources/Deli/Core/Type/ResolveRole.swift @@ -1,13 +1,16 @@ // -// ResolveScope.swift +// ResolveRole.swift // Deli // +@available(*, deprecated, renamed: "ResolveRole") +public typealias ResolveRule = ResolveRole + /// Resolve Role /// /// `AppContext` can loaded many `ModuleFactory`. /// When call Inject(), get instance by `LoadPriority` order by default. -public enum ResolveRule { +public enum ResolveRole { // MARK: - Type diff --git a/Sources/Deli/Dependency.swift b/Sources/Deli/Dependency.swift new file mode 100644 index 0000000..44a664c --- /dev/null +++ b/Sources/Deli/Dependency.swift @@ -0,0 +1,43 @@ +// +// Dependency.swift +// Deli +// +// Created by Kawoou on 2020/03/06. +// + +@propertyWrapper +public struct Dependency: Inject { + + // MARK: - Public property + + public var wrappedValue: Value { instance } + + // MARK: - Private property + + private let instance: Value + + // MARK: - Lifecycle + + public init() { + instance = AppContext.shared.get(Value.self)! + } + + public init( + qualifier: String? = nil, + resolveRole: ResolveRole = .recursive + ) { + instance = AppContext.shared.get( + Value.self, + qualifier: qualifier ?? "", + resolveRole: resolveRole + )! + } + + public init( + qualifierBy: String, + resolveRole: ResolveRole = .recursive + ) { + let qualifier = AppContext.shared.getProperty(qualifierBy) as! String + self.init(qualifier: qualifier, resolveRole: resolveRole) + } +} diff --git a/Sources/Deli/DependencyArray.swift b/Sources/Deli/DependencyArray.swift new file mode 100644 index 0000000..f565915 --- /dev/null +++ b/Sources/Deli/DependencyArray.swift @@ -0,0 +1,43 @@ +// +// DependencyArray.swift +// Deli +// +// Created by Kawoou on 2020/03/06. +// + +@propertyWrapper +public struct DependencyArray: Inject { + + // MARK: - Public property + + public var wrappedValue: [Value] { instance } + + // MARK: - Private property + + private let instance: [Value] + + // MARK: - Lifecycle + + public init() { + instance = AppContext.shared.get([Value].self) + } + + public init( + qualifier: String? = nil, + resolveRole: ResolveRole = .recursive + ) { + instance = AppContext.shared.get( + [Value].self, + qualifier: qualifier ?? "", + resolveRole: resolveRole + ) + } + + public init( + qualifierBy: String, + resolveRole: ResolveRole = .default + ) { + let qualifier = AppContext.shared.getProperty(qualifierBy) as! String + self.init(qualifier: qualifier, resolveRole: resolveRole) + } +} diff --git a/Sources/Deli/Inject.swift b/Sources/Deli/Inject.swift index 8ce2d24..8fdc21a 100644 --- a/Sources/Deli/Inject.swift +++ b/Sources/Deli/Inject.swift @@ -19,10 +19,10 @@ public extension Inject { /// - qualifier: The registered qualifier. /// - resolveRole: The resolve role(default: recursive) /// - Returns: The resolved instance. - public static func Inject( + static func Inject( _ type: T.Type, qualifier: String? = nil, - resolveRole: ResolveRule = .recursive + resolveRole: ResolveRole = .recursive ) -> T { return AppContext.shared.get( type, @@ -38,10 +38,10 @@ public extension Inject { /// - qualifier: The registered qualifier. /// - resolveRole: The resolve role. /// - Returns: The resolved instances, or empty. - public static func Inject( + static func Inject( _ type: [T].Type, qualifier: String? = nil, - resolveRole: ResolveRule = .default + resolveRole: ResolveRole = .default ) -> [T] { return AppContext.shared.get( type, @@ -57,10 +57,10 @@ public extension Inject { /// - argument: User data for resolve. /// - resolveRole: The resolve role(default: recursive) /// - Returns: The resolved instance. - public static func Inject( + static func Inject( _ type: T.Type, with argument: T.RawPayload.Tuple, - resolveRole: ResolveRule = .recursive + resolveRole: ResolveRole = .recursive ) -> T { let payload = T.RawPayload(with: argument) return AppContext.shared.get( @@ -77,10 +77,10 @@ public extension Inject { /// - argument: User data for resolve. /// - resolveRole: The resolve role. /// - Returns: The resolved instances, or emtpy. - public static func Inject( + static func Inject( _ type: [T].Type, with argument: T.RawPayload.Tuple, - resolveRole: ResolveRule = .default + resolveRole: ResolveRole = .default ) -> [T] { let payload = T.RawPayload(with: argument) return AppContext.shared.get( @@ -97,10 +97,10 @@ public extension Inject { /// - qualifierBy: The registered qualifier by property. /// - resolveRole: The resolve role(default: recursive) /// - Returns: The resolved instance. - public static func Inject( + static func Inject( _ type: T.Type, qualifierBy: String, - resolveRole: ResolveRule = .recursive + resolveRole: ResolveRole = .recursive ) -> T { let qualifier = AppContext.shared.getProperty(qualifierBy) as! String return Inject(type, qualifier: qualifier, resolveRole: resolveRole) @@ -113,10 +113,10 @@ public extension Inject { /// - qualifierBy: The registered qualifier by property. /// - resolveRole: The resolve role. /// - Returns: The resolved instances, or empty. - public static func Inject( + static func Inject( _ type: [T].Type, qualifierBy: String, - resolveRole: ResolveRule = .default + resolveRole: ResolveRole = .default ) -> [T] { let qualifier = AppContext.shared.getProperty(qualifierBy) as! String return Inject(type, qualifier: qualifier, resolveRole: resolveRole) @@ -128,9 +128,9 @@ public extension Inject { /// - path: Property path. /// - resolveRole: The resolve role. /// - Returns: The property. - public static func InjectProperty( + static func InjectProperty( _ path: String, - resolveRole: ResolveRule = .default + resolveRole: ResolveRole = .default ) -> String { return AppContext.shared.getProperty(path, resolveRole: resolveRole) as! String } @@ -144,10 +144,10 @@ public extension Inject { /// - qualifier: The registered qualifier. /// - resolveRole: The resolve role(default: recursive) /// - Returns: The resolved instance. - public func Inject( + func Inject( _ type: T.Type, qualifier: String? = nil, - resolveRole: ResolveRule = .recursive + resolveRole: ResolveRole = .recursive ) -> T { return Self.Inject( type, @@ -163,10 +163,10 @@ public extension Inject { /// - qualifier: The registered qualifier. /// - resolveRole: The resolve role. /// - Returns: The resolved instances, or empty. - public func Inject( + func Inject( _ type: [T].Type, qualifier: String? = nil, - resolveRole: ResolveRule = .default + resolveRole: ResolveRole = .default ) -> [T] { return Self.Inject( type, @@ -182,10 +182,10 @@ public extension Inject { /// - argument: User data for resolve. /// - resolveRole: The resolve role(default: recursive) /// - Returns: The resolved instance. - public func Inject( + func Inject( _ type: T.Type, with argument: T.RawPayload.Tuple, - resolveRole: ResolveRule = .recursive + resolveRole: ResolveRole = .recursive ) -> T { return Self.Inject( type, @@ -201,10 +201,10 @@ public extension Inject { /// - argument: User data for resolve. /// - resolveRole: The resolve role. /// - Returns: The resolved instances, or emtpy. - public func Inject( + func Inject( _ type: [T].Type, with argument: T.RawPayload.Tuple, - resolveRole: ResolveRule = .default + resolveRole: ResolveRole = .default ) -> [T] { return Self.Inject( type, @@ -220,10 +220,10 @@ public extension Inject { /// - qualifierBy: The registered qualifier by property. /// - resolveRole: The resolve role(default: recursive) /// - Returns: The resolved instance. - public func Inject( + func Inject( _ type: T.Type, qualifierBy: String, - resolveRole: ResolveRule = .recursive + resolveRole: ResolveRole = .recursive ) -> T { return Self.Inject(type, qualifierBy: qualifierBy, resolveRole: resolveRole) } @@ -235,10 +235,10 @@ public extension Inject { /// - qualifierBy: The registered qualifier by property. /// - resolveRole: The resolve role. /// - Returns: The resolved instances, or empty. - public func Inject( + func Inject( _ type: [T].Type, qualifierBy: String, - resolveRole: ResolveRule = .default + resolveRole: ResolveRole = .default ) -> [T] { return Self.Inject(type, qualifierBy: qualifierBy, resolveRole: resolveRole) } @@ -249,9 +249,9 @@ public extension Inject { /// - path: Property path. /// - resolveRole: The resolve role. /// - Returns: The property. - public func InjectProperty( + func InjectProperty( _ path: String, - resolveRole: ResolveRule = .default + resolveRole: ResolveRole = .default ) -> String { return Self.InjectProperty(path, resolveRole: resolveRole) } diff --git a/Sources/Deli/LazyAutowired.swift b/Sources/Deli/LazyAutowired.swift index 12f47c0..911b3a2 100644 --- a/Sources/Deli/LazyAutowired.swift +++ b/Sources/Deli/LazyAutowired.swift @@ -73,8 +73,8 @@ public protocol LazyAutowired: Inject { } public extension LazyAutowired { - public var qualifier: String? { return nil } - public var scope: Scope { return .singleton } + var qualifier: String? { return nil } + var scope: Scope { return .singleton } func inject(_ dep1: Dep1) {} func inject(_ dep1: Dep1, _ dep2: Dep2) {} diff --git a/Sources/Deli/LazyAutowiredFactory.swift b/Sources/Deli/LazyAutowiredFactory.swift index 3414e95..a02c418 100644 --- a/Sources/Deli/LazyAutowiredFactory.swift +++ b/Sources/Deli/LazyAutowiredFactory.swift @@ -87,8 +87,8 @@ public protocol LazyAutowiredFactory: Factory { } public extension LazyAutowiredFactory { /// To supports type-inference of the compiler. - public var payloadType: _Payload.Type { return _Payload.self } - public var qualifier: String? { return nil } + var payloadType: _Payload.Type { return _Payload.self } + var qualifier: String? { return nil } func inject(_ dep1: Dep1) {} func inject(_ dep1: Dep1, _ dep2: Dep2) {} diff --git a/Sources/Deli/PropertyValue.swift b/Sources/Deli/PropertyValue.swift new file mode 100644 index 0000000..d057306 --- /dev/null +++ b/Sources/Deli/PropertyValue.swift @@ -0,0 +1,27 @@ +// +// PropertyValue.swift +// Deli +// +// Created by Kawoou on 2020/03/06. +// + +@propertyWrapper +public struct PropertyValue { + + // MARK: - Public property + + public var wrappedValue: String { value } + + // MARK: - Private property + + private let value: String + + // MARK: - Lifecycle + + public init( + _ path: String, + resolveRole: ResolveRole = .default + ) { + value = AppContext.shared.getProperty(path, resolveRole: resolveRole) as! String + } +} diff --git a/Supports/Autowired.erb b/Supports/Autowired.erb index 5826454..b706075 100644 --- a/Supports/Autowired.erb +++ b/Supports/Autowired.erb @@ -26,8 +26,8 @@ public protocol Autowired: Inject {<% for dep in 1..9 %> <% end %> } public extension Autowired { - public var qualifier: String? { return nil } - public var scope: Scope { return .singleton } + var qualifier: String? { return nil } + var scope: Scope { return .singleton } <% for dep in 1..9 params = (1..dep).map { |i| "_ dep#{i}: Dep#{i}" } diff --git a/Supports/AutowiredFactory.erb b/Supports/AutowiredFactory.erb index 122c6fc..b5aaf7c 100644 --- a/Supports/AutowiredFactory.erb +++ b/Supports/AutowiredFactory.erb @@ -33,8 +33,8 @@ public protocol AutowiredFactory: Factory {<% for dep in 1..9 %> } public extension AutowiredFactory { /// To supports type-inference of the compiler. - public var payloadType: _Payload.Type { return _Payload.self } - public var qualifier: String? { return nil } + var payloadType: _Payload.Type { return _Payload.self } + var qualifier: String? { return nil } init(payload: _Payload) { self.init(payload: payload) diff --git a/Supports/Configuration.erb b/Supports/Configuration.erb index 17d74ea..7f60e8c 100644 --- a/Supports/Configuration.erb +++ b/Supports/Configuration.erb @@ -26,7 +26,7 @@ public extension Configuration { /// dependencies of the type. /// It is invoked when needs to instantiate the instance. /// - Returns: The closure that resolve dependency type. - public static func Config 0 %>, <% end %><%= generics_str %>>( + static func Config 0 %>, <% end %><%= generics_str %>>( _ type: T.Type,<% for arg in (1..dep) %> _ dependency<%= arg %>: Dep<%= arg %>.Type,<% end %> qualifier: String = "", diff --git a/Supports/LazyAutowired.erb b/Supports/LazyAutowired.erb index affa4c4..5aa0ab2 100644 --- a/Supports/LazyAutowired.erb +++ b/Supports/LazyAutowired.erb @@ -29,8 +29,8 @@ public protocol LazyAutowired: Inject {<% for dep in 1..9 %> <% end %> } public extension LazyAutowired { - public var qualifier: String? { return nil } - public var scope: Scope { return .singleton } + var qualifier: String? { return nil } + var scope: Scope { return .singleton } <% for dep in 1..9 params = (1..dep).map { |i| "_ dep#{i}: Dep#{i}" } diff --git a/Supports/LazyAutowiredFactory.erb b/Supports/LazyAutowiredFactory.erb index abded4e..11f44db 100644 --- a/Supports/LazyAutowiredFactory.erb +++ b/Supports/LazyAutowiredFactory.erb @@ -35,8 +35,8 @@ public protocol LazyAutowiredFactory: Factory {<% for dep in 1..9 %> } public extension LazyAutowiredFactory { /// To supports type-inference of the compiler. - public var payloadType: _Payload.Type { return _Payload.self } - public var qualifier: String? { return nil } + var payloadType: _Payload.Type { return _Payload.self } + var qualifier: String? { return nil } <% for dep in 1..9 params = (1..dep).map { |i| "_ dep#{i}: Dep#{i}" } diff --git a/Supports/build-binary.sh b/Supports/build-binary.sh index 4a087bd..1d84a02 100755 --- a/Supports/build-binary.sh +++ b/Supports/build-binary.sh @@ -10,7 +10,7 @@ rm -rf .build/ rm -rf Build/ mkdir Build -swift build -c release -Xswiftc -static-stdlib +swift build --static-swift-stdlib -c release cp .build/release/deli ./Build pkgbuild --identifier "io.kawoou.deli" --install-location "/usr/local/bin" --root "Build" --version "`cat ../version`" "Build/Deli.pkg" cp ../LICENSE ./Build/LICENSE diff --git a/Tests/DeliTests/DeliSample/AccountConfiguration.swift b/Tests/DeliTests/DeliSample/AccountConfiguration.swift index aace05e..2832dcc 100644 --- a/Tests/DeliTests/DeliSample/AccountConfiguration.swift +++ b/Tests/DeliTests/DeliSample/AccountConfiguration.swift @@ -2,7 +2,11 @@ import Deli class AccountConfiguration: Configuration { - let accountService = Config(AccountService.self, NetworkManager.self, LibraryService.self, qualifier: "facebook") { (networkManager, libraryService) in + let facebookAccountService = Config(AccountService.self, NetworkManager.self, LibraryService.self, qualifier: "facebook") { (networkManager, libraryService) in + return AccountServiceImpl(networkManager, libraryService) + } + + let googleAccountService = Config(AccountService.self, NetworkManager.self, LibraryService.self, qualifier: "google") { (networkManager, libraryService) in return AccountServiceImpl(networkManager, libraryService) } diff --git a/Tests/DeliTests/DeliSample/DeliFactory.swift b/Tests/DeliTests/DeliSample/DeliFactory.swift index 0f307e1..3e2ebbf 100644 --- a/Tests/DeliTests/DeliSample/DeliFactory.swift +++ b/Tests/DeliTests/DeliSample/DeliFactory.swift @@ -8,12 +8,22 @@ import Deli final class DeliFactory: ModuleFactory { override func load(context: AppContext) { loadProperty([ + "boolean1": "true", + "boolean2": "1", "environment": "dev", + "int16": "32767", + "int32": "2147483647", + "int64": "9223372036854775807", + "int8": "127", "server": [ "method": "get", "port": "8080", "url": "http://dev.test.com" - ] + ], + "uint16": "65535", + "uint32": "4294967295", + "uint64": "18446744073709551615", + "uint8": "255" ]) register( @@ -28,10 +38,19 @@ final class DeliFactory: ModuleFactory { AccountService.self, resolver: { let parent = context.get(AccountConfiguration.self, qualifier: "")! - return parent.accountService() + return parent.facebookAccountService() }, qualifier: "facebook", scope: .singleton + ) + register( + AccountService.self, + resolver: { + let parent = context.get(AccountConfiguration.self, qualifier: "")! + return parent.googleAccountService() + }, + qualifier: "google", + scope: .singleton ).link(AccountService.self) register( AlwaysModel.self, @@ -95,8 +114,8 @@ final class DeliFactory: ModuleFactory { registerFactory( FriendInfoViewModel.self, resolver: { payload in - let _0 = context.get(AccountService.self, qualifier: "")! - return FriendInfoViewModel(_0, payload: payload as! FriendPayload) + let _0 = context.get(AccountService.self, qualifier: "facebook")! + return FriendInfoViewModel(facebook: _0, payload: payload as! FriendPayload) }, qualifier: "" ).link(FriendInfoViewModel.self) @@ -112,8 +131,8 @@ final class DeliFactory: ModuleFactory { register( FriendServiceImpl.self, resolver: { - let _0 = context.get(AccountService.self, qualifier: "")! - return FriendServiceImpl(_0) + let _0 = context.get(AccountService.self, qualifier: "facebook")! + return FriendServiceImpl(facebook: _0) }, qualifier: "", scope: .singleton @@ -176,8 +195,43 @@ final class DeliFactory: ModuleFactory { MessageServiceImpl.self, resolver: { let _0 = context.get(FriendService.self, qualifier: "")! - let _1 = context.get(AccountService.self, qualifier: "")! - return MessageServiceImpl(_0, _1) + let _1 = context.get(AccountService.self, qualifier: "facebook")! + return MessageServiceImpl(_0, facebook: _1) + }, + qualifier: "", + scope: .singleton + ) + register( + NestedClass.NestedStruct.self, + resolver: { + return NestedClass.NestedStruct() + }, + qualifier: "", + scope: .singleton + ) + register( + NestedStruct.NestedClass.self, + resolver: { + return NestedStruct.NestedClass() + }, + qualifier: "", + scope: .singleton + ) + register( + NestedStruct.NestedClass.NestedStruct.NestedClass.self, + resolver: { + return NestedStruct.NestedClass.NestedStruct.NestedClass() + }, + qualifier: "", + scope: .singleton + ) + register( + NestedTestClass.self, + resolver: { + let _0 = context.get(NestedClass.NestedStruct.self, qualifier: "")! + let _1 = context.get(NestedStruct.NestedClass.self, qualifier: "")! + let _2 = context.get(NestedStruct.NestedClass.NestedStruct.NestedClass.self, qualifier: "")! + return NestedTestClass(_0, _1, _2) }, qualifier: "", scope: .singleton @@ -209,7 +263,7 @@ final class DeliFactory: ModuleFactory { register( PropertyAutowired.self, resolver: { - let _qualifier0 = context.getProperty("environment") as! String + let _qualifier0 = context.getProperty("environment", type: String.self)! let _0 = context.get(NetworkProvider.self, qualifier: _qualifier0)! return PropertyAutowired(_0) }, @@ -219,7 +273,7 @@ final class DeliFactory: ModuleFactory { registerFactory( PropertyAutowiredFactory.self, resolver: { payload in - let _qualifier0 = context.getProperty("environment") as! String + let _qualifier0 = context.getProperty("environment", type: String.self)! let _0 = context.get(NetworkProvider.self, qualifier: _qualifier0)! return PropertyAutowiredFactory(_0, payload: payload as! PropertyAutowiredFactoryPayload) }, @@ -239,7 +293,7 @@ final class DeliFactory: ModuleFactory { return PropertyLazyAutowired() }, injector: { instance in - let _qualifier0 = context.getProperty("environment") as! String + let _qualifier0 = context.getProperty("environment", type: String.self)! let _0 = context.get(NetworkProvider.self, qualifier: _qualifier0)! instance.inject(_0) }, @@ -252,12 +306,38 @@ final class DeliFactory: ModuleFactory { return PropertyLazyAutowiredFactory(payload: payload as! PropertyLazyAutowiredFactoryPayload) }, injector: { instance in - let _qualifier0 = context.getProperty("environment") as! String + let _qualifier0 = context.getProperty("environment", type: String.self)! let _0 = context.get(NetworkProvider.self, qualifier: _qualifier0)! instance.inject(_0) }, qualifier: "" ) + register( + PropertyWrapperTest1.self, + resolver: { + let _0 = context.get(AccountService.self, qualifier: "google")! + let _1 = context.get(FriendService.self, qualifier: "")! + return PropertyWrapperTest1(google: _0, _1) + }, + qualifier: "", + scope: .prototype + ) + register( + PropertyWrapperTest3.self, + resolver: { + return PropertyWrapperTest3() + }, + qualifier: "", + scope: .prototype + ).link(PropertyWrapperTest2.self) + register( + PropertyWrapperTest4.self, + resolver: { + return PropertyWrapperTest4() + }, + qualifier: "", + scope: .prototype + ).link(PropertyWrapperTest2.self) register( PutMethod.self, resolver: { @@ -294,9 +374,9 @@ final class DeliFactory: ModuleFactory { ServerConfig.self, resolver: { return ServerConfig( - method: context.getProperty("server.method") as! String, - url: context.getProperty("server.url") as! String, - port: context.getProperty("server.port") as! String + method: context.getProperty("server.method", type: String.self), + url: context.getProperty("server.url", type: String.self)!, + port: context.getProperty("server.port", type: Int.self)! ) }, qualifier: "", @@ -350,9 +430,9 @@ final class DeliFactory: ModuleFactory { register( TestViewModel.self, resolver: { - let _0 = context.get(AccountService.self, qualifier: "")! + let _0 = context.get(AccountService.self, qualifier: "facebook")! let _1 = context.get(FriendService.self, qualifier: "")! - return TestViewModel(_0, _1) + return TestViewModel(facebook: _0, _1) }, qualifier: "", scope: .prototype @@ -378,8 +458,8 @@ final class DeliFactory: ModuleFactory { registerFactory( UserViewModel.self, resolver: { payload in - let _0 = context.get(AccountService.self, qualifier: "")! - return UserViewModel(_0, payload: payload as! UserPayload) + let _0 = context.get(AccountService.self, qualifier: "facebook")! + return UserViewModel(facebook: _0, payload: payload as! UserPayload) }, qualifier: "" ).link(UserViewModel.self) diff --git a/Tests/DeliTests/DeliSample/DependencyTestModel.swift b/Tests/DeliTests/DeliSample/DependencyTestModel.swift new file mode 100644 index 0000000..9b588a9 --- /dev/null +++ b/Tests/DeliTests/DeliSample/DependencyTestModel.swift @@ -0,0 +1,22 @@ +// +// DependencyTestModel.swift +// Deli +// +// Created by Kawoou on 2020/03/06. +// + +import Deli + +struct DependencyTestModel { + @Dependency var test1: PropertyWrapperTest1 + @Dependency(qualifier: "google") var googleAccountService: AccountService + @Dependency(qualifierBy: "server.method") var method: NetworkMethod + + @DependencyArray var test2: [PropertyWrapperTest2] + @DependencyArray(qualifier: "google") var accountServices: [AccountService] + @DependencyArray(qualifierBy: "server.method") var methods: [NetworkMethod] + + @PropertyValue("server.url") var propertyValue: String + + init() {} +} diff --git a/Tests/DeliTests/DeliSample/FriendInfoViewModel.swift b/Tests/DeliTests/DeliSample/FriendInfoViewModel.swift index d4ac997..4ebbb78 100644 --- a/Tests/DeliTests/DeliSample/FriendInfoViewModel.swift +++ b/Tests/DeliTests/DeliSample/FriendInfoViewModel.swift @@ -1,12 +1,14 @@ import Deli class FriendInfoViewModel: AutowiredFactory { + typealias _Payload = FriendPayload + let accountService: AccountService let userID: String var name: String - required init(_ accountService: AccountService, payload: FriendPayload) { + required init(facebook accountService: AccountService, payload: FriendPayload) { self.accountService = accountService self.userID = payload.userID self.name = payload.cachedName diff --git a/Tests/DeliTests/DeliSample/FriendService.swift b/Tests/DeliTests/DeliSample/FriendService.swift index 870efe5..ae857ab 100644 --- a/Tests/DeliTests/DeliSample/FriendService.swift +++ b/Tests/DeliTests/DeliSample/FriendService.swift @@ -33,7 +33,7 @@ class FriendServiceImpl: FriendService, Autowired { return friendList[id] } - required init(_ accountService: AccountService) { + required init(facebook accountService: AccountService) { self.accountService = accountService } } diff --git a/Tests/DeliTests/DeliSample/MessageService.swift b/Tests/DeliTests/DeliSample/MessageService.swift index 79615c7..d33c636 100644 --- a/Tests/DeliTests/DeliSample/MessageService.swift +++ b/Tests/DeliTests/DeliSample/MessageService.swift @@ -17,7 +17,7 @@ class MessageServiceImpl: MessageService, Autowired { return [] } - required init(_ dep1: MessageServiceImpl.Dep1, _ dep2: Dep2) { + required init(_ dep1: MessageServiceImpl.Dep1, facebook dep2: Dep2) { friendService = dep1 accountService = dep2 } diff --git a/Tests/DeliTests/DeliSample/NestedType.swift b/Tests/DeliTests/DeliSample/NestedType.swift new file mode 100644 index 0000000..6d04318 --- /dev/null +++ b/Tests/DeliTests/DeliSample/NestedType.swift @@ -0,0 +1,38 @@ +// +// NestedType.swift +// Deli +// +// Created by Kawoou on 2020/01/14. +// + +import Deli + +class NestedClass { + struct NestedStruct: Component { + + } +} + +struct NestedStruct { + class NestedClass: Component { + struct NestedStruct { + class NestedClass: Component { + + } + } + } +} + +class NestedTestClass: Autowired { + typealias NestedType = NestedStruct.NestedClass.NestedStruct.NestedClass + + let a: NestedClass.NestedStruct + let b: NestedStruct.NestedClass + let c: NestedType + + required init(_ a: NestedClass.NestedStruct, _ b: NestedStruct.NestedClass, _ c: NestedType) { + self.a = a + self.b = b + self.c = c + } +} diff --git a/Tests/DeliTests/DeliSample/Property/ServerConfig.swift b/Tests/DeliTests/DeliSample/Property/ServerConfig.swift index ffc3a88..f5c54bf 100644 --- a/Tests/DeliTests/DeliSample/Property/ServerConfig.swift +++ b/Tests/DeliTests/DeliSample/Property/ServerConfig.swift @@ -10,13 +10,7 @@ import Deli struct ServerConfig: ConfigProperty { let target: String = "server" - let method: String + let method: String? let url: String let port: Int - - init(method: String, url: String, port: String) { - self.method = method - self.url = url - self.port = Int(port) ?? 0 - } } diff --git a/Tests/DeliTests/DeliSample/Property/application-dev.yml b/Tests/DeliTests/DeliSample/Property/application-dev.yml index 1764c25..1ef81e0 100644 --- a/Tests/DeliTests/DeliSample/Property/application-dev.yml +++ b/Tests/DeliTests/DeliSample/Property/application-dev.yml @@ -2,3 +2,13 @@ environment: dev server: url: http://dev.test.com method: get +boolean1: true +boolean2: 1 +int8: 127 +int16: 32767 +int32: 2147483647 +int64: 9223372036854775807 +uint8: 255 +uint16: 65535 +uint32: 4294967295 +uint64: 18446744073709551615 diff --git a/Tests/DeliTests/DeliSample/PropertyWrapper/PropertyWrapperTest1.swift b/Tests/DeliTests/DeliSample/PropertyWrapper/PropertyWrapperTest1.swift new file mode 100644 index 0000000..2e88212 --- /dev/null +++ b/Tests/DeliTests/DeliSample/PropertyWrapper/PropertyWrapperTest1.swift @@ -0,0 +1,28 @@ +// +// PropertyWrapperTest1.swift +// Deli +// +// Created by Kawoou on 2020/03/15. +// + +import Deli + +class PropertyWrapperTest1: Autowired { + var scope: Scope { + return .prototype + } + + var testCount: Int = 0 + + let accountService: AccountService + let friendService: FriendService + + func test() { + testCount += 1 + } + + required init(google accountService: AccountService, _ friendService: FriendService) { + self.accountService = accountService + self.friendService = friendService + } +} diff --git a/Tests/DeliTests/DeliSample/PropertyWrapper/PropertyWrapperTest2.swift b/Tests/DeliTests/DeliSample/PropertyWrapper/PropertyWrapperTest2.swift new file mode 100644 index 0000000..49dcb84 --- /dev/null +++ b/Tests/DeliTests/DeliSample/PropertyWrapper/PropertyWrapperTest2.swift @@ -0,0 +1,26 @@ +// +// PropertyWrapperTest2.swift +// DeliTests +// +// Created by Kawoou on 2020/03/15. +// + +import Deli + +protocol PropertyWrapperTest2 {} + +class PropertyWrapperTest3: PropertyWrapperTest2, Component { + var scope: Scope { + return .prototype + } + + required init() {} +} + +class PropertyWrapperTest4: PropertyWrapperTest2, Component { + var scope: Scope { + return .prototype + } + + required init() {} +} diff --git a/Tests/DeliTests/DeliSample/TestDeliFactory.swift b/Tests/DeliTests/DeliSample/TestDeliFactory.swift new file mode 100644 index 0000000..a052d83 --- /dev/null +++ b/Tests/DeliTests/DeliSample/TestDeliFactory.swift @@ -0,0 +1,24 @@ +// +// TestDeliFactory.swift +// DeliTests +// +// Created by Kawoou on 12/02/2019. +// + +import Deli + +final class TestDeliFactory: ModuleFactory { + override func load(context: AppContext) { + register( + TestDeliObject.self, + resolver: { + return TestDeliObject( + a: context.getProperty("server.port", type: Int.self)!, + b: context.getProperty("server.url", type: String.self)! + ) + }, + qualifier: "", + scope: .always + ) + } +} diff --git a/Tests/DeliTests/DeliSample/TestDeliObject.swift b/Tests/DeliTests/DeliSample/TestDeliObject.swift new file mode 100644 index 0000000..74657e0 --- /dev/null +++ b/Tests/DeliTests/DeliSample/TestDeliObject.swift @@ -0,0 +1,16 @@ +// +// TestDeliObject.swift +// DeliTests +// +// Created by Kawoou on 13/02/2019. +// + +struct TestDeliObject { + let a: Int + let b: String + + init(a: Int, b: String) { + self.a = a + self.b = b + } +} diff --git a/Tests/DeliTests/DeliSample/TestViewModel.swift b/Tests/DeliTests/DeliSample/TestViewModel.swift index b2f735b..205b233 100644 --- a/Tests/DeliTests/DeliSample/TestViewModel.swift +++ b/Tests/DeliTests/DeliSample/TestViewModel.swift @@ -14,7 +14,7 @@ class TestViewModel: Autowired { testCount += 1 } - required init(_ accountService: AccountService, _ friendService: FriendService) { + required init(facebook accountService: AccountService, _ friendService: FriendService) { self.accountService = accountService self.friendService = friendService } diff --git a/Tests/DeliTests/DeliSample/UserViewModel.swift b/Tests/DeliTests/DeliSample/UserViewModel.swift index 2d0fd8b..38f1124 100644 --- a/Tests/DeliTests/DeliSample/UserViewModel.swift +++ b/Tests/DeliTests/DeliSample/UserViewModel.swift @@ -1,10 +1,12 @@ import Deli class UserViewModel: AutowiredFactory { + typealias _Payload = UserPayload + let accountService: AccountService let userID: String - required init(_ accountService: AccountService, payload: UserPayload) { + required init(facebook accountService: AccountService, payload: UserPayload) { self.accountService = accountService self.userID = payload.userID } diff --git a/Tests/DeliTests/DeliSpec.swift b/Tests/DeliTests/DeliSpec.swift index d2b6454..184e292 100644 --- a/Tests/DeliTests/DeliSpec.swift +++ b/Tests/DeliTests/DeliSpec.swift @@ -26,6 +26,255 @@ class DeliSpec: QuickSpec, Inject { appContext.unloadAll() appContext.reset() } + describe("getProperty() when multi-module environment") { + beforeEach { + appContext.load([ + TestDeliFactory.self, + DeliFactory.self + ]) + } + it("TestDeliObject's 'a' property value should be DeliFactory's 'server.port' property") { + let object = appContext.get(TestDeliObject.self)! + expect(object.a) == appContext.getProperty("server.port", type: Int.self) + } + it("TestDeliObject's 'b' property value should be DeliFactory's 'server.url' property") { + let object = appContext.get(TestDeliObject.self)! + expect(object.b) == appContext.getProperty("server.url", type: String.self) + } + } + describe("getProperty()") { + beforeEach { + appContext.load([ + DeliFactory.self + ]) + } + context("for String type") { + var value: String? + beforeEach { + value = appContext.getProperty("server.url", type: String.self) + } + it("value should be 'http://dev.test.com'") { + expect(value) == "http://dev.test.com" + } + } + context("for Bool type") { + var value: Bool? + context("when original value is string") { + beforeEach { + value = appContext.getProperty("boolean1", type: Bool.self) + } + it("value should be true") { + expect(value) == true + } + } + context("when original value is number") { + beforeEach { + value = appContext.getProperty("boolean2", type: Bool.self) + } + it("value should be true") { + expect(value) == true + } + } + } + context("for Double type") { + var value: Double? + beforeEach { + value = appContext.getProperty("int32", type: Double.self) + } + it("value should be 2147483647.0") { + expect(value) == 2147483647.0 + } + } + context("for Float type") { + var value: Float? + beforeEach { + value = appContext.getProperty("int32", type: Float.self) + } + it("value should be Float(2147483647)") { + expect(value) == Float(2147483647) + } + } + context("for Int type") { + var value: Int? + context("failure test") { + beforeEach { + value = appContext.getProperty("server.url", type: Int.self) + } + it("value should be nil") { + expect(value).to(beNil()) + } + } + context("success test") { + beforeEach { + value = appContext.getProperty("server.port", type: Int.self) + } + it("value should be 8080") { + expect(value) == 8080 + } + } + } + context("for Int8 type") { + var value: Int8? + context("overflow test") { + beforeEach { + value = appContext.getProperty("uint8", type: Int8.self) + } + it("value should be nil") { + expect(value).to(beNil()) + } + } + context("success test") { + beforeEach { + value = appContext.getProperty("int8", type: Int8.self) + } + it("value should be 127") { + expect(value) == 127 + } + } + } + context("for Int16 type") { + var value: Int16? + context("overflow test") { + beforeEach { + value = appContext.getProperty("uint16", type: Int16.self) + } + it("value should be nil") { + expect(value).to(beNil()) + } + } + context("success test") { + beforeEach { + value = appContext.getProperty("int16", type: Int16.self) + } + it("value should be 32767") { + expect(value) == 32767 + } + } + } + context("for Int32 type") { + var value: Int32? + context("overflow test") { + beforeEach { + value = appContext.getProperty("uint32", type: Int32.self) + } + it("value should be nil") { + expect(value).to(beNil()) + } + } + context("success test") { + beforeEach { + value = appContext.getProperty("int32", type: Int32.self) + } + it("value should be 2147483647") { + expect(value) == 2147483647 + } + } + } + context("for Int64 type") { + var value: Int64? + context("overflow test") { + beforeEach { + value = appContext.getProperty("uint64", type: Int64.self) + } + it("value should be nil") { + expect(value).to(beNil()) + } + } + context("success test") { + beforeEach { + value = appContext.getProperty("int64", type: Int64.self) + } + it("value should be 9223372036854775807") { + expect(value) == 9223372036854775807 + } + } + } + context("for UInt type") { + var value: UInt? + context("failure test") { + beforeEach { + value = appContext.getProperty("server.url", type: UInt.self) + } + it("value should be nil") { + expect(value).to(beNil()) + } + } + context("success test") { + beforeEach { + value = appContext.getProperty("server.port", type: UInt.self) + } + it("value should be 8080") { + expect(value) == 8080 + } + } + } + context("for UInt8 type") { + var value: UInt8? + context("overflow test") { + beforeEach { + value = appContext.getProperty("uint16", type: UInt8.self) + } + it("value should be nil") { + expect(value).to(beNil()) + } + } + context("success test") { + beforeEach { + value = appContext.getProperty("uint8", type: UInt8.self) + } + it("value should be 255") { + expect(value) == 255 + } + } + } + context("for UInt16 type") { + var value: UInt16? + context("overflow test") { + beforeEach { + value = appContext.getProperty("uint32", type: UInt16.self) + } + it("value should be nil") { + expect(value).to(beNil()) + } + } + context("success test") { + beforeEach { + value = appContext.getProperty("uint16", type: UInt16.self) + } + it("value should be 65535") { + expect(value) == 65535 + } + } + } + context("for UInt32 type") { + var value: UInt32? + context("overflow test") { + beforeEach { + value = appContext.getProperty("uint64", type: UInt32.self) + } + it("value should be nil") { + expect(value).to(beNil()) + } + } + context("success test") { + beforeEach { + value = appContext.getProperty("uint32", type: UInt32.self) + } + it("value should be 4294967295") { + expect(value) == 4294967295 + } + } + } + context("for UInt64 type") { + var value: UInt64? + beforeEach { + value = appContext.getProperty("uint64", type: UInt64.self) + } + it("value should be 18446744073709551615") { + expect(value) == 18446744073709551615 + } + } + } describe("getProperty()") { var sut: Any? @@ -324,11 +573,11 @@ class DeliSpec: QuickSpec, Inject { accountConfiguration = appContext.get(AccountConfiguration.self) networkManager = appContext.get(NetworkManager.self) - sut = appContext.get(AccountService.self) + sut = appContext.get(AccountService.self, qualifier: "facebook") networkManager.request() sut.networkManager.request() - accountConfiguration.accountService().networkManager.request() + accountConfiguration.facebookAccountService().networkManager.request() } it("requestCount of networkManager should equal to 3") { expect(networkManager.requestCount) == 3 @@ -343,7 +592,7 @@ class DeliSpec: QuickSpec, Inject { var testView2: TestView2! beforeEach { - accountService = appContext.get(AccountService.self) + accountService = appContext.get(AccountService.self, qualifier: "facebook") friendService = appContext.get(FriendService.self) messageService = appContext.get(MessageServiceImpl.self) testViewModel = appContext.get(TestViewModel.self) @@ -601,6 +850,47 @@ class DeliSpec: QuickSpec, Inject { expect(String(describing: factoryTest.payloadType)) == String(describing: TestPayload.self) } } + context("when inject from string class") { + var accountConfiguration: Any? + beforeEach { + accountConfiguration = appContext.get(Any.self, className: "AccountConfiguration") + } + it("accountConfiguration should inhertiance AccountConfiguration") { + expect { accountConfiguration is AccountConfiguration } == true + } + } + context("when inject from string class with payload") { + var userViewModel: UserViewModel? + beforeEach { + userViewModel = appContext.get(UserViewModel.self, className: "UserViewModel", payload: UserPayload(with: ("UserID"))) + } + it("userViewModel should not be nil") { + expect(userViewModel).notTo(beNil()) + } + } + context("when inject from string class without resolve") { + var sut1: Any? + var sut2: Any? + var sut3: Any? + + beforeEach { + sut1 = appContext.get(withoutResolve: Any.self, className: "AccountConfiguration", qualifier: "") + sut2 = appContext.get(Any.self, className: "AccountConfiguration") + sut3 = appContext.get(withoutResolve: Any.self, className: "AccountConfiguration", qualifier: "") + } + it("sut1 should be nil") { + expect(sut1 as? AccountConfiguration).to(beNil()) + } + it("sut2 should not to be nil") { + expect(sut2).notTo(beNil()) + } + it("sut3 should not to be nil") { + expect(sut3).notTo(beNil()) + } + it("sut2 should be sut3") { + expect(sut2) === sut3 + } + } describe("multi-container test") { var accountService: AccountService! var books: [Book] = [] @@ -841,7 +1131,7 @@ class DeliSpec: QuickSpec, Inject { it("all instance should be nil") { expect(appContext.get(withoutResolve: AccountService.self, qualifier: "")).to(beNil()) expect(appContext.get(withoutResolve: [Book].self, qualifier: "").count) == 0 - expect(appContext.get(AccountService.self)).notTo(beNil()) + expect(appContext.get(AccountService.self, qualifier: "facebook")).notTo(beNil()) expect(appContext.get([Book].self).count) == 3 } } @@ -1016,6 +1306,79 @@ class DeliSpec: QuickSpec, Inject { } } } + describe("PropertyWrapper test") { + describe("by @Dependency") { + var sut: DependencyTestModel! + + beforeEach { + sut = DependencyTestModel() + } + context("test case 1") { + beforeEach { + sut.test1.test() + } + it("sut's test1.testCount should be 1") { + expect(sut.test1.testCount) == 1 + } + } + context("test case 2") { + beforeEach { + sut.googleAccountService.logout() + } + it("sut's googleAccountService.logoutCount should be 1") { + expect(sut.googleAccountService.logoutCount) == 1 + } + } + context("test case 3") { + it("sut's method.qualifier should be 'get'") { + expect(sut.method.qualifier) == "get" + } + } + } + describe("by @DependencyArray") { + var sut: DependencyTestModel! + + beforeEach { + sut = DependencyTestModel() + } + context("test case 1") { + it("sut's test2.count should be 2") { + expect(sut.test2.count) == 2 + } + } + context("test case 2") { + it("sut's accountServices.count should be 1") { + expect(sut.accountServices.count) == 1 + } + } + context("test case 3") { + it("sut's methods.count should be 1") { + expect(sut.methods.count) == 1 + } + } + } + describe("by @PropertyValue") { + var sut: DependencyTestModel! + + beforeEach { + sut = DependencyTestModel() + } + + it("sut's propertyValue should be 'http://dev.test.com'") { + expect(sut.propertyValue) == "http://dev.test.com" + } + } + } + context("when inject nested type") { + var sut: NestedTestClass? + + beforeEach { + sut = appContext.get(NestedTestClass.self) + } + it("sut should be nil") { + expect(sut).toNot(beNil()) + } + } } } } diff --git a/deli.yml b/deli.yml index c2b1f85..b044fa5 100644 --- a/deli.yml +++ b/deli.yml @@ -21,4 +21,6 @@ config: - Tests/DeliTests/DeliSample/Struct/StructWithLazyAutowired.swift properties: - Tests/DeliTests/DeliSample/Property/Common/* - - Tests/DeliTests/DeliSample/Property/application-dev.yml \ No newline at end of file + - Tests/DeliTests/DeliSample/Property/application-dev.yml + resolve: + generate: false \ No newline at end of file