mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-12-11 07:16:40 +03:00
Merge branch 'master' into external-target-ref
This commit is contained in:
commit
6397368465
@ -6,6 +6,7 @@
|
||||
|
||||
- Added `includes` to `sources` for a Target. This follows the same glob-style as `excludes` but functions as a way to only include files that match a specified pattern. Useful if you only want a certain file type, for example specifying `**/*.swift`. [#637](https://github.com/yonaskolb/XcodeGen/pull/637) @bclymer
|
||||
- Support `dylib` SDK. [#650](https://github.com/yonaskolb/XcodeGen/pull/650) @kateinoigakukun
|
||||
- Added `language` and `region` options for `run` and `test` scheme [#654](https://github.com/yonaskolb/XcodeGen/pull/654) @kateinoigakukun
|
||||
- Support External Target Reference. [#655](https://github.com/yonaskolb/XcodeGen/pull/655) @kateinoigakukun
|
||||
|
||||
#### Fixed
|
||||
|
@ -689,6 +689,8 @@ The different actions share some properties:
|
||||
- [ ] **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
|
||||
- [ ] **language**: **String** - `run` and `test` actions can define a language that is used for Application Language
|
||||
- [ ] **region**: **String** - `run` and `test` actions can define a language that is used for Application Region
|
||||
|
||||
### Execution Action
|
||||
|
||||
|
@ -76,6 +76,8 @@ public struct Scheme: Equatable {
|
||||
public var postActions: [ExecutionAction]
|
||||
public var environmentVariables: [XCScheme.EnvironmentVariable]
|
||||
public var disableMainThreadChecker: Bool
|
||||
public var language: String?
|
||||
public var region: String?
|
||||
|
||||
public init(
|
||||
config: String,
|
||||
@ -83,7 +85,9 @@ public struct Scheme: Equatable {
|
||||
preActions: [ExecutionAction] = [],
|
||||
postActions: [ExecutionAction] = [],
|
||||
environmentVariables: [XCScheme.EnvironmentVariable] = [],
|
||||
disableMainThreadChecker: Bool = disableMainThreadCheckerDefault
|
||||
disableMainThreadChecker: Bool = disableMainThreadCheckerDefault,
|
||||
language: String? = nil,
|
||||
region: String? = nil
|
||||
) {
|
||||
self.config = config
|
||||
self.commandLineArguments = commandLineArguments
|
||||
@ -91,6 +95,8 @@ public struct Scheme: Equatable {
|
||||
self.postActions = postActions
|
||||
self.environmentVariables = environmentVariables
|
||||
self.disableMainThreadChecker = disableMainThreadChecker
|
||||
self.language = language
|
||||
self.region = region
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,6 +112,8 @@ public struct Scheme: Equatable {
|
||||
public var preActions: [ExecutionAction]
|
||||
public var postActions: [ExecutionAction]
|
||||
public var environmentVariables: [XCScheme.EnvironmentVariable]
|
||||
public var language: String?
|
||||
public var region: String?
|
||||
|
||||
public struct TestTarget: Equatable, ExpressibleByStringLiteral {
|
||||
public static let randomExecutionOrderDefault = false
|
||||
@ -150,7 +158,9 @@ public struct Scheme: Equatable {
|
||||
targets: [TestTarget] = [],
|
||||
preActions: [ExecutionAction] = [],
|
||||
postActions: [ExecutionAction] = [],
|
||||
environmentVariables: [XCScheme.EnvironmentVariable] = []
|
||||
environmentVariables: [XCScheme.EnvironmentVariable] = [],
|
||||
language: String? = nil,
|
||||
region: String? = nil
|
||||
) {
|
||||
self.config = config
|
||||
self.gatherCoverageData = gatherCoverageData
|
||||
@ -160,6 +170,8 @@ public struct Scheme: Equatable {
|
||||
self.preActions = preActions
|
||||
self.postActions = postActions
|
||||
self.environmentVariables = environmentVariables
|
||||
self.language = language
|
||||
self.region = region
|
||||
}
|
||||
|
||||
public var shouldUseLaunchSchemeArgsEnv: Bool {
|
||||
@ -267,6 +279,8 @@ extension Scheme.Run: JSONObjectConvertible {
|
||||
postActions = jsonDictionary.json(atKeyPath: "postActions") ?? []
|
||||
environmentVariables = try XCScheme.EnvironmentVariable.parseAll(jsonDictionary: jsonDictionary)
|
||||
disableMainThreadChecker = jsonDictionary.json(atKeyPath: "disableMainThreadChecker") ?? Scheme.Run.disableMainThreadCheckerDefault
|
||||
language = jsonDictionary.json(atKeyPath: "language")
|
||||
region = jsonDictionary.json(atKeyPath: "region")
|
||||
}
|
||||
}
|
||||
|
||||
@ -278,6 +292,8 @@ extension Scheme.Run: JSONEncodable {
|
||||
"postActions": postActions.map { $0.toJSONValue() },
|
||||
"environmentVariables": environmentVariables.map { $0.toJSONValue() },
|
||||
"config": config,
|
||||
"language": language,
|
||||
"region": region,
|
||||
]
|
||||
|
||||
if disableMainThreadChecker != Scheme.Run.disableMainThreadCheckerDefault {
|
||||
@ -311,6 +327,8 @@ extension Scheme.Test: JSONObjectConvertible {
|
||||
preActions = jsonDictionary.json(atKeyPath: "preActions") ?? []
|
||||
postActions = jsonDictionary.json(atKeyPath: "postActions") ?? []
|
||||
environmentVariables = try XCScheme.EnvironmentVariable.parseAll(jsonDictionary: jsonDictionary)
|
||||
language = jsonDictionary.json(atKeyPath: "language")
|
||||
region = jsonDictionary.json(atKeyPath: "region")
|
||||
}
|
||||
}
|
||||
|
||||
@ -323,6 +341,8 @@ extension Scheme.Test: JSONEncodable {
|
||||
"postActions": postActions.map { $0.toJSONValue() },
|
||||
"environmentVariables": environmentVariables.map { $0.toJSONValue() },
|
||||
"config": config,
|
||||
"language": language,
|
||||
"region": region,
|
||||
]
|
||||
|
||||
if gatherCoverageData != Scheme.Test.gatherCoverageDataDefault {
|
||||
|
@ -161,7 +161,9 @@ public class SchemeGenerator {
|
||||
codeCoverageEnabled: scheme.test?.gatherCoverageData ?? Scheme.Test.gatherCoverageDataDefault,
|
||||
disableMainThreadChecker: scheme.test?.disableMainThreadChecker ?? Scheme.Test.disableMainThreadCheckerDefault,
|
||||
commandlineArguments: testCommandLineArgs,
|
||||
environmentVariables: testVariables
|
||||
environmentVariables: testVariables,
|
||||
language: scheme.test?.language,
|
||||
region: scheme.test?.region
|
||||
)
|
||||
|
||||
let launchAction = XCScheme.LaunchAction(
|
||||
@ -172,7 +174,9 @@ public class SchemeGenerator {
|
||||
macroExpansion: shouldExecuteOnLaunch ? nil : buildableReference,
|
||||
disableMainThreadChecker: scheme.run?.disableMainThreadChecker ?? Scheme.Run.disableMainThreadCheckerDefault,
|
||||
commandlineArguments: launchCommandLineArgs,
|
||||
environmentVariables: launchVariables
|
||||
environmentVariables: launchVariables,
|
||||
language: scheme.run?.language,
|
||||
region: scheme.run?.region
|
||||
)
|
||||
|
||||
let profileAction = XCScheme.ProfileAction(
|
||||
|
@ -44,6 +44,8 @@
|
||||
buildConfiguration = "Production Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = "ja"
|
||||
region = "en"
|
||||
codeCoverageEnabled = "YES"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
|
@ -257,6 +257,8 @@ schemes:
|
||||
argument.with.dot: YES
|
||||
test:
|
||||
gatherCoverageData: true
|
||||
language: ja
|
||||
region: en
|
||||
App_Scheme:
|
||||
build:
|
||||
targets:
|
||||
|
Loading…
Reference in New Issue
Block a user