From 048ed75ac49e80465e54d40b8fd6dc5ce2c42e38 Mon Sep 17 00:00:00 2001 From: Rahul Malik Date: Tue, 13 Feb 2018 18:48:10 -0500 Subject: [PATCH] Update for comments --- Docs/ProjectSpec.md | 9 +++++++++ Sources/ProjectSpec/Scheme.swift | 8 ++++---- Sources/XcodeGenKit/ProjectGenerator.swift | 2 +- Tests/XcodeGenKitTests/SpecLoadingTests.swift | 4 ++-- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 9adfac1d..d6d3c60c 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -418,10 +418,19 @@ Schemes allows for more control than the convenience [Target Scheme](#target-sch - `analyze` or `analyzing` - `archive` or `archiving` +- [ ] **parallelizeBuild**: **Bool** - Whether or not your targets should be built in parallel. + - `true`: Build targets in parallel + - `false`: Build targets serially +- [ ] **buildImplicitDependencies**: **Bool** - Flag to determine if Xcode should be implicit dependencies of this scheme. + - `true`: Discover implicit dependencies of this scheme + - `false`: Only build explicit dependencies of this scheme + ```yaml targets: myTarget: all myTarget2: [test, run] +parallelizeBuild: true +buildImplicitDependencies: true ``` ### Common Build Action options diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index 8bf82b06..b8640c02 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -51,19 +51,19 @@ public struct Scheme: Equatable { public struct Build: Equatable { public var targets: [BuildTarget] - public var parallelizeBuildables: Bool + public var parallelizeBuild: Bool public var buildImplicitDependencies: Bool public var preActions: [ExecutionAction] public var postActions: [ExecutionAction] public init( targets: [BuildTarget], - parallelizeBuildables: Bool = true, + parallelizeBuild: Bool = true, buildImplicitDependencies: Bool = true, preActions: [ExecutionAction] = [], postActions: [ExecutionAction] = [] ) { self.targets = targets - self.parallelizeBuildables = parallelizeBuildables + self.parallelizeBuild = parallelizeBuild self.buildImplicitDependencies = buildImplicitDependencies self.preActions = preActions self.postActions = postActions @@ -316,7 +316,7 @@ extension Scheme.Build: JSONObjectConvertible { self.targets = targets.sorted { $0.target < $1.target } preActions = try jsonDictionary.json(atKeyPath: "preActions")?.map(Scheme.ExecutionAction.init) ?? [] postActions = try jsonDictionary.json(atKeyPath: "postActions")?.map(Scheme.ExecutionAction.init) ?? [] - parallelizeBuildables = jsonDictionary.json(atKeyPath: "parallelizeBuildables") ?? true + parallelizeBuild = jsonDictionary.json(atKeyPath: "parallelizeBuild") ?? true buildImplicitDependencies = jsonDictionary.json(atKeyPath: "buildImplicitDependencies") ?? true } } diff --git a/Sources/XcodeGenKit/ProjectGenerator.swift b/Sources/XcodeGenKit/ProjectGenerator.swift index 80d1ce4e..f2aec870 100644 --- a/Sources/XcodeGenKit/ProjectGenerator.swift +++ b/Sources/XcodeGenKit/ProjectGenerator.swift @@ -78,7 +78,7 @@ public class ProjectGenerator { buildActionEntries: buildActionEntries, preActions: scheme.build.preActions.map(getExecutionAction), postActions: scheme.build.postActions.map(getExecutionAction), - parallelizeBuild: scheme.build.parallelizeBuildables, + parallelizeBuild: scheme.build.parallelizeBuild, buildImplicitDependencies: scheme.build.buildImplicitDependencies ) diff --git a/Tests/XcodeGenKitTests/SpecLoadingTests.swift b/Tests/XcodeGenKitTests/SpecLoadingTests.swift index aadedf6a..1f66bff5 100644 --- a/Tests/XcodeGenKitTests/SpecLoadingTests.swift +++ b/Tests/XcodeGenKitTests/SpecLoadingTests.swift @@ -157,7 +157,7 @@ func specLoadingTests() { $0.it("parses schemes") { let schemeDictionary: [String: Any] = [ "build": [ - "parallelizeBuildables": false, + "parallelizeBuild": false, "buildImplicitDependencies": false, "targets": [ "Target1": "all", @@ -191,7 +191,7 @@ func specLoadingTests() { try expect(scheme.build.preActions.first?.name) == "Before Build" try expect(scheme.build.preActions.first?.settingsTarget) == "Target1" - try expect(scheme.build.parallelizeBuildables) == false + try expect(scheme.build.parallelizeBuild) == false try expect(scheme.build.buildImplicitDependencies) == false }