From 5d9c3a9ab85fab7193d8222513a4f0b8b6256cab Mon Sep 17 00:00:00 2001 From: Eric Miller Date: Tue, 10 Oct 2017 13:39:18 -0500 Subject: [PATCH 1/4] Update to xcproj 0.4.0 --- Package.resolved | 13 ++----------- Sources/ProjectSpec/Settings.swift | 2 ++ Sources/XcodeGenKit/PBXProjGenerator.swift | 3 ++- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Package.resolved b/Package.resolved index 8a0e3bcf5..a66eca333 100644 --- a/Package.resolved +++ b/Package.resolved @@ -55,15 +55,6 @@ "version": "0.7.2" } }, - { - "package": "Unbox", - "repositoryURL": "https://github.com/JohnSundell/Unbox.git", - "state": { - "branch": null, - "revision": "17ad6aa1cc2f1efa27a0bbbdb66f79796708aa95", - "version": "2.5.0" - } - }, { "package": "Yams", "repositoryURL": "https://github.com/jpsim/Yams.git", @@ -78,8 +69,8 @@ "repositoryURL": "https://github.com/xcodeswift/xcproj.git", "state": { "branch": null, - "revision": "e937b43cefa9c67a1787aba482ceb2f3ba172baf", - "version": "0.3.0" + "revision": "e25c5dfa28cbabec51bc7df0d4a11664be1bbb5f", + "version": "0.4.0" } } ] diff --git a/Sources/ProjectSpec/Settings.swift b/Sources/ProjectSpec/Settings.swift index 6e84eeb8d..248368605 100644 --- a/Sources/ProjectSpec/Settings.swift +++ b/Sources/ProjectSpec/Settings.swift @@ -11,6 +11,8 @@ import JSONUtilities import xcproj import PathKit import Yams + +public typealias BuildSettings = [String : Any] public struct Settings: Equatable, JSONObjectConvertible, CustomStringConvertible { public let buildSettings: BuildSettings diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 22c096541..3f1857507 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -124,7 +124,8 @@ public class PBXProjGenerator { let knownRegions: [String] = ["en", "Base"] let projectAttributes: [String: Any] = ["LastUpgradeCheck": currentXcodeVersion].merged(spec.attributes) - let root = PBXProject(reference: project.rootObject, + let root = PBXProject(name: spec.name, + reference: project.rootObject, buildConfigurationList: buildConfigList.reference, compatibilityVersion: "Xcode 3.2", mainGroup: mainGroup.reference, From 713631a4596a5e0680b197d020088ce3afd8454f Mon Sep 17 00:00:00 2001 From: Eric Miller Date: Wed, 11 Oct 2017 10:44:05 -0500 Subject: [PATCH 2/4] Update GeneratedProject file to use the new classes dictionary format --- .../GeneratedProject.xcodeproj/project.pbxproj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Fixtures/TestProject/GeneratedProject.xcodeproj/project.pbxproj b/Fixtures/TestProject/GeneratedProject.xcodeproj/project.pbxproj index 595240703..384971a91 100644 --- a/Fixtures/TestProject/GeneratedProject.xcodeproj/project.pbxproj +++ b/Fixtures/TestProject/GeneratedProject.xcodeproj/project.pbxproj @@ -1,8 +1,8 @@ // !$*UTF8*$! { archiveVersion = 1; - classes = ( - ); + classes = { + }; objectVersion = 46; objects = { @@ -14,7 +14,7 @@ BF2753556301 = {isa = PBXBuildFile; fileRef = FR2993497801 /* MyFramework.framework */; }; BF3154421201 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FR5980633301 /* Assets.xcassets */; }; BF3515549501 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = FR7740960501 /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BF3862341101 /* MyFramework.framework in Copy Files */ = {isa = PBXBuildFile; fileRef = FR2993497801 /* MyFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + BF3862341101 /* MyFramework.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = FR2993497801 /* MyFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; BF4946816301 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = VG1473702401 /* Main.storyboard */; }; BF5986511201 = {isa = PBXBuildFile; fileRef = FR6523263101 /* TestProject.app */; }; BF6182896901 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FR9215298301 /* Result.framework */; }; @@ -46,7 +46,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - BF3862341101 /* MyFramework.framework in Copy Files */, + BF3862341101 /* MyFramework.framework in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -269,7 +269,7 @@ attributes = { LastUpgradeCheck = 0900; }; - buildConfigurationList = XCCL81399401 /* Build configuration list for PBXProject */; + buildConfigurationList = XCCL81399401 /* Build configuration list for PBXProject "GeneratedProject" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; knownRegions = ( @@ -709,7 +709,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = ""; }; - XCCL81399401 /* Build configuration list for PBXProject */ = { + XCCL81399401 /* Build configuration list for PBXProject "GeneratedProject" */ = { isa = XCConfigurationList; buildConfigurations = ( XCBC47994501 /* Debug */, From ca3c64baa6d89c8d27c195a3813b72fe8ef64b41 Mon Sep 17 00:00:00 2001 From: Eric Miller Date: Thu, 12 Oct 2017 07:31:38 -0500 Subject: [PATCH 3/4] Update xcproj to 0.4.1 and Yams to 0.3.7 --- Package.resolved | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Package.resolved b/Package.resolved index a66eca333..58535b03b 100644 --- a/Package.resolved +++ b/Package.resolved @@ -60,8 +60,8 @@ "repositoryURL": "https://github.com/jpsim/Yams.git", "state": { "branch": null, - "revision": "5ac9248b378b5e12201c255ba74caf990d1e0f4b", - "version": "0.3.6" + "revision": "05921531200acff0d8d9caab5ec77b2bcf300b6b", + "version": "0.3.7" } }, { @@ -69,8 +69,8 @@ "repositoryURL": "https://github.com/xcodeswift/xcproj.git", "state": { "branch": null, - "revision": "e25c5dfa28cbabec51bc7df0d4a11664be1bbb5f", - "version": "0.4.0" + "revision": "cd1c329c6e092fdf5afbddf10dd59da564293aa6", + "version": "0.4.1" } } ] From 6a168acb4667e558b07afa745c8c8b8c8f1ec4eb Mon Sep 17 00:00:00 2001 From: Eric Miller Date: Thu, 12 Oct 2017 07:37:22 -0500 Subject: [PATCH 4/4] Remove workaround typealias --- Sources/ProjectSpec/Settings.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Sources/ProjectSpec/Settings.swift b/Sources/ProjectSpec/Settings.swift index 248368605..3682a2f83 100644 --- a/Sources/ProjectSpec/Settings.swift +++ b/Sources/ProjectSpec/Settings.swift @@ -12,7 +12,6 @@ import xcproj import PathKit import Yams -public typealias BuildSettings = [String : Any] public struct Settings: Equatable, JSONObjectConvertible, CustomStringConvertible { public let buildSettings: BuildSettings