-
Notifications
You must be signed in to change notification settings - Fork 16
/
Scheme+Template.swift
37 lines (35 loc) · 1.42 KB
/
Scheme+Template.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import ProjectDescription
extension Scheme {
static func makeScheme(target: ConfigurationName, name: String) -> Scheme {
return Scheme.scheme(
name: name,
shared: true,
buildAction: .buildAction(targets: ["\(name)"]),
testAction: .targets(
["\(name)Tests"],
configuration: target,
options: .options(coverage: true, codeCoverageTargets: ["\(name)"])
),
runAction: .runAction(configuration: target),
archiveAction: .archiveAction(configuration: target),
profileAction: .profileAction(configuration: target),
analyzeAction: .analyzeAction(configuration: target)
)
}
static func makeDemoScheme(target: ConfigurationName, name: String) -> Scheme {
return Scheme.scheme(
name: name,
shared: true,
buildAction: .buildAction(targets: ["\(name)Demo"]),
testAction: .targets(
["\(name)Tests"],
configuration: target,
options: .options(coverage: true, codeCoverageTargets: ["\(name)Demo"])
),
runAction: .runAction(configuration: target),
archiveAction: .archiveAction(configuration: target),
profileAction: .profileAction(configuration: target),
analyzeAction: .analyzeAction(configuration: target)
)
}
}