mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
Allow nil values
This commit is contained in:
@@ -63,25 +63,19 @@ extension BuildScript: JSONObjectConvertible {
|
||||
}
|
||||
extension BuildScript: JSONEncodable {
|
||||
public func toJSONValue() -> Any {
|
||||
var dict: JSONDictionary = [
|
||||
var dict: [String: Any?] = [
|
||||
"inputFiles": inputFiles,
|
||||
"inputFileLists": inputFileLists,
|
||||
"outputFiles": outputFiles,
|
||||
"outputFileLists": outputFileLists
|
||||
"outputFileLists": outputFileLists,
|
||||
"runOnlyWhenInstalling": runOnlyWhenInstalling,
|
||||
"name": name,
|
||||
"shell": shell
|
||||
]
|
||||
|
||||
if runOnlyWhenInstalling {
|
||||
dict["runOnlyWhenInstalling"] = runOnlyWhenInstalling
|
||||
}
|
||||
if !showEnvVars {
|
||||
dict["showEnvVars"] = showEnvVars
|
||||
}
|
||||
if let name = name {
|
||||
dict["name"] = name
|
||||
}
|
||||
if let shell = shell {
|
||||
dict["shell"] = shell
|
||||
}
|
||||
|
||||
switch script {
|
||||
case .path(let string):
|
||||
|
||||
Reference in New Issue
Block a user