mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
Optionally make intermediate filler groups
This commit adds a new option `createIntermediateGroups` that defaults to false. When it is false, the behavior of XcodeGen is the same as before. When it is true, we make intermediate groups recursively until we reach the basePath. In practice that means if you've chosen `Platform/PINFoundation/Sources` as one of your sourcePaths, you get a top-level group of `Platform` and under that `PINFoundation` and under that `Sources`. This is instead of the default behavior of just making `Sources` a top-level group (which is confusing when your directory is called `Sources` for example).
This commit is contained in:
@@ -29,6 +29,7 @@ public struct ProjectSpec {
|
||||
|
||||
public struct Options {
|
||||
public var carthageBuildPath: String?
|
||||
public var createIntermediateGroups: Bool
|
||||
public var bundleIdPrefix: String?
|
||||
public var settingPresets: SettingPresets = .all
|
||||
|
||||
@@ -54,6 +55,7 @@ public struct ProjectSpec {
|
||||
}
|
||||
|
||||
public init() {
|
||||
createIntermediateGroups = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,5 +162,6 @@ extension ProjectSpec.Options: JSONObjectConvertible {
|
||||
carthageBuildPath = jsonDictionary.json(atKeyPath: "carthageBuildPath")
|
||||
bundleIdPrefix = jsonDictionary.json(atKeyPath: "bundleIdPrefix")
|
||||
settingPresets = jsonDictionary.json(atKeyPath: "settingPresets") ?? .all
|
||||
createIntermediateGroups = jsonDictionary.json(atKeyPath: "createIntermediateGroups") ?? false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user