mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-12-11 07:16:40 +03:00
suggested edits
This commit is contained in:
parent
d32a710fa2
commit
7bde3b5641
@ -2,6 +2,10 @@
|
||||
|
||||
## Next Version
|
||||
|
||||
#### Added
|
||||
|
||||
- Added ability to disable main thread checker on Run and Test schemes and TargetSchemes [#601](https://github.com/yonaskolb/XcodeGen/pull/601) @wag-miles
|
||||
|
||||
## 2.6.0
|
||||
|
||||
#### Added
|
||||
|
@ -680,6 +680,7 @@ The different actions share some properties:
|
||||
- [ ] **preActions**: **[[Execution Action](#execution-action)]** - Scripts that are run *before* the action
|
||||
- [ ] **postActions**: **[[Execution Action](#execution-action)]** - Scripts that are run *after* the action
|
||||
- [ ] **environmentVariables**: **[[Environment Variable](#environment-variable)]** or **[String:String]** - `run`, `test` and `profile` actions can define the environment variables. When passing a dictionary, every key-value entry maps to a corresponding variable that is enabled.
|
||||
- [ ] **disableMainThreadChecker**: **Bool** - `run` and `test` actions can define a boolean that indicates that this scheme should disable the Main Thread Checker. This defaults to false
|
||||
|
||||
### Execution Action
|
||||
|
||||
@ -694,7 +695,6 @@ A multiline script can be written using the various YAML multiline methods, for
|
||||
### Test Action
|
||||
|
||||
- [ ] **gatherCoverageData**: **Bool** - a boolean that indicates if this scheme should gather coverage data. This defaults to false
|
||||
- [ ] **disableMainThreadChecker**: **Bool** - a boolean that indicates if this scheme should disable disable the Main Thread Checker. This defaults to false
|
||||
- [ ] **targets**: **[[Test Target](#test-target)]** - a list of targets to test. Each entry can either be a simple string, or a [Test Target](#test-target)
|
||||
|
||||
#### Test Target
|
||||
|
@ -266,13 +266,19 @@ extension Scheme.Run: JSONObjectConvertible {
|
||||
|
||||
extension Scheme.Run: JSONEncodable {
|
||||
public func toJSONValue() -> Any {
|
||||
return [
|
||||
var dict: [String: Any?] = [
|
||||
"commandLineArguments": commandLineArguments,
|
||||
"preActions": preActions.map { $0.toJSONValue() },
|
||||
"postActions": postActions.map { $0.toJSONValue() },
|
||||
"environmentVariables": environmentVariables.map { $0.toJSONValue() },
|
||||
"config": config
|
||||
] as [String: Any?]
|
||||
]
|
||||
|
||||
if disableMainThreadChecker != Scheme.Run.disableMainThreadCheckerDefault {
|
||||
dict["disableMainThreadChecker"] = disableMainThreadChecker
|
||||
}
|
||||
|
||||
return dict
|
||||
}
|
||||
}
|
||||
|
||||
@ -304,16 +310,24 @@ extension Scheme.Test: JSONObjectConvertible {
|
||||
|
||||
extension Scheme.Test: JSONEncodable {
|
||||
public func toJSONValue() -> Any {
|
||||
return [
|
||||
"gatherCoverageData": gatherCoverageData,
|
||||
"disableMainThreadChecker": disableMainThreadChecker,
|
||||
var dict: [String: Any?] = [
|
||||
"commandLineArguments": commandLineArguments,
|
||||
"targets": targets.map { $0.toJSONValue() },
|
||||
"preActions": preActions.map { $0.toJSONValue() },
|
||||
"postActions": postActions.map { $0.toJSONValue() },
|
||||
"environmentVariables": environmentVariables.map { $0.toJSONValue() },
|
||||
"config": config
|
||||
] as [String: Any?]
|
||||
]
|
||||
|
||||
if gatherCoverageData != Scheme.Test.gatherCoverageDataDefault {
|
||||
dict["gatherCoverageData"] = gatherCoverageData
|
||||
}
|
||||
|
||||
if disableMainThreadChecker != Scheme.Test.disableMainThreadCheckerDefault {
|
||||
dict["disableMainThreadChecker"] = disableMainThreadChecker
|
||||
}
|
||||
|
||||
return dict
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user