mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-09-20 09:08:46 +03:00
ability to override target name
This commit is contained in:
parent
d5204199f3
commit
061bddd18b
@ -11,4 +11,6 @@ targets:
|
||||
type: application
|
||||
platform: iOS
|
||||
IncludedTarget:
|
||||
name: IncludedTargetNew
|
||||
platform: tvOS
|
||||
sources: Target
|
||||
|
@ -159,7 +159,7 @@ extension TargetScheme: JSONObjectConvertible {
|
||||
extension Target: NamedJSONDictionaryConvertible {
|
||||
|
||||
public init(name: String, jsonDictionary: JSONDictionary) throws {
|
||||
self.name = name
|
||||
self.name = jsonDictionary.json(atKeyPath: "name") ?? name
|
||||
let typeString: String = try jsonDictionary.json(atKeyPath: "type")
|
||||
if let type = PBXProductType(string: typeString) {
|
||||
self.type = type
|
||||
|
@ -41,7 +41,7 @@ func specLoadingTests() {
|
||||
"new": Settings(dictionary: ["MY_SETTING": "VALUE"]),
|
||||
]
|
||||
try expect(spec.targets) == [
|
||||
Target(name: "IncludedTarget", type: .application, platform: .tvOS),
|
||||
Target(name: "IncludedTargetNew", type: .application, platform: .tvOS, sources: ["Target"]),
|
||||
Target(name: "NewTarget", type: .application, platform: .iOS),
|
||||
]
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ Required properties are marked 🔵 and optional properties with ⚪️.
|
||||
## Project
|
||||
|
||||
- 🔵 **name**: `String` - Name of the generated project
|
||||
- ⚪️ **include**: `[String]` - The paths to other specs. They will be merged in order and then the current spec will be merged on top
|
||||
- ⚪️ **include**: `[String]` - The paths to other specs. They will be merged in order and then the current spec will be merged on top. Target names can be changed by adding a `name` property
|
||||
- ⚪️ **options**: [Options](#options) - Various options to override default behaviour
|
||||
- ⚪️ **attributes**: `map` - The PBXProject attributes. This is for advanced use. Defaults to ``{"LastUpgradeCheck": "0830"}``
|
||||
- ⚪️ **configs**: [Configs](#configs) - Project build configurations. Defaults to `Debug` and `Release` configs
|
||||
|
Loading…
Reference in New Issue
Block a user