diff --git a/Makefile b/Makefile index 8a02d99d..90f50dbd 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ TOOL_NAME = XcodeGen -VERSION = 1.3.0 +VERSION = 1.4.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(TOOL_NAME) diff --git a/Sources/ProjectSpec/TargetSource.swift b/Sources/ProjectSpec/TargetSource.swift index 3beedcb8..d0879459 100644 --- a/Sources/ProjectSpec/TargetSource.swift +++ b/Sources/ProjectSpec/TargetSource.swift @@ -73,4 +73,3 @@ extension TargetSource: Equatable { && lhs.type == rhs.type } } - diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 97602d0d..e26f584d 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -15,7 +15,7 @@ import ProjectSpec import JSONUtilities import Rainbow -let version = "1.3.0" +let version = "1.4.0" func generate(spec: String, project: String) { diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index a63a6ac5..6df170f6 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -224,7 +224,7 @@ public class PBXProjGenerator { var baseConfigurationReference: String? if let configPath = target.configFiles[config.name] { - baseConfigurationReference = sourceGenerator.getContainedFileReference(path: spec.basePath + configPath) + baseConfigurationReference = sourceGenerator.getContainedFileReference(path: spec.basePath + configPath) } return XCBuildConfiguration(reference: referenceGenerator.generate(XCBuildConfiguration.self, config.name + target.name), name: config.name, baseConfigurationReference: baseConfigurationReference, buildSettings: buildSettings) } diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index a7214e04..0e6e0674 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -62,7 +62,7 @@ class SourceGenerator { settings["COMPILER_FLAGS"] = targetSource.compilerFlags.joined(separator: " ") } - //TODO: add the target name to the reference generator string so shared files don't have same reference (that will be escaped by appending a number) + // TODO: add the target name to the reference generator string so shared files don't have same reference (that will be escaped by appending a number) let buildFile = PBXBuildFile(reference: referenceGenerator.generate(PBXBuildFile.self, fileReference + targetName), fileRef: fileReference, settings: settings.isEmpty ? nil : settings) return SourceFile(path: path, fileReference: fileReference, buildFile: buildFile, buildPhase: buildPhase) } @@ -91,7 +91,6 @@ class SourceGenerator { } } - private func getDefaultBuildPhase(for path: Path) -> BuildPhase? { if path.lastComponent == "Info.plist" { return nil @@ -109,7 +108,7 @@ class SourceGenerator { private func getGroup(path: Path, name: String? = nil, mergingChildren children: [String], createIntermediateGroups: Bool, isBaseGroup: Bool) -> PBXGroup { let group: PBXGroup - + if let cachedGroup = groupsByPath[path] { // only add the children that aren't already in the cachedGroup cachedGroup.children = Array(Set(cachedGroup.children + children)) diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 1d2dd94b..1751a2e1 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -264,7 +264,7 @@ func projectGeneratorTests() { referenceGenerator.generate(PBXGroup.self, "a"), referenceGenerator.generate(PBXFileReference.self, "a"), referenceGenerator.generate(XCConfigurationList.self, "a"), - ] + ] try expect(references[0].hasPrefix("G")).to.beTrue() try expect(references[1].hasPrefix("FR")).to.beTrue() try expect(references[2].hasPrefix("CL")).to.beTrue() @@ -523,7 +523,7 @@ func projectGeneratorTests() { let target = Target(name: "Test", type: .application, platform: .iOS, sources: [ TargetSource(path: "Sources/A", type: .folder), - ]) + ]) let spec = ProjectSpec(basePath: directoryPath, name: "Test", targets: [target]) let project = try getPbxProj(spec)