mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
Add defaultConfigurationName to options
This allows users to set the defaultConfigurationName project wide. This setting corresponds to the drop down in the project settings that says "Use CONFIG for command line builds". This affects which configuration Xcode looks in for some settings, even if you pass `-configuration FOO`.
This commit is contained in:
@@ -32,6 +32,7 @@ public struct ProjectSpec {
|
||||
public var indentWidth: UInt?
|
||||
public var xcodeVersion: String?
|
||||
public var deploymentTarget: DeploymentTarget
|
||||
public var defaultConfigurationName: String?
|
||||
|
||||
public enum SettingPresets: String {
|
||||
case all
|
||||
@@ -66,7 +67,8 @@ public struct ProjectSpec {
|
||||
usesTabs: Bool? = nil,
|
||||
xcodeVersion: String? = nil,
|
||||
deploymentTarget: DeploymentTarget = .init(),
|
||||
disabledValidations: [ValidationType] = []
|
||||
disabledValidations: [ValidationType] = [],
|
||||
defaultConfigurationName: String? = nil
|
||||
) {
|
||||
self.carthageBuildPath = carthageBuildPath
|
||||
self.carthageExecutablePath = carthageExecutablePath
|
||||
@@ -80,6 +82,7 @@ public struct ProjectSpec {
|
||||
self.xcodeVersion = xcodeVersion
|
||||
self.deploymentTarget = deploymentTarget
|
||||
self.disabledValidations = disabledValidations
|
||||
self.defaultConfigurationName = defaultConfigurationName
|
||||
}
|
||||
|
||||
public static func == (lhs: ProjectSpec.Options, rhs: ProjectSpec.Options) -> Bool {
|
||||
@@ -217,5 +220,6 @@ extension ProjectSpec.Options: JSONObjectConvertible {
|
||||
tabWidth = (jsonDictionary.json(atKeyPath: "tabWidth") as Int?).flatMap(UInt.init)
|
||||
deploymentTarget = jsonDictionary.json(atKeyPath: "deploymentTarget") ?? DeploymentTarget()
|
||||
disabledValidations = jsonDictionary.json(atKeyPath: "disabledValidations") ?? []
|
||||
defaultConfigurationName = jsonDictionary.json(atKeyPath: "defaultConfigurationName")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user