@@ -18,8 +18,7 @@ public enum Module: String, CaseIterable {
18
18
targets. append ( target (
19
19
name: acceptanceTestsTargetName,
20
20
product: . unitTests,
21
- dependencies: acceptanceTestDependencies,
22
- isTestingTarget: false
21
+ dependencies: acceptanceTestDependencies
23
22
) )
24
23
}
25
24
@@ -34,8 +33,7 @@ public enum Module: String, CaseIterable {
34
33
target (
35
34
name: unitTestsTargetName,
36
35
product: . unitTests,
37
- dependencies: unitTestDependencies,
38
- isTestingTarget: false
36
+ dependencies: unitTestDependencies
39
37
)
40
38
)
41
39
}
@@ -45,8 +43,7 @@ public enum Module: String, CaseIterable {
45
43
target (
46
44
name: integrationTestsTargetName,
47
45
product: . unitTests,
48
- dependencies: integrationTestsDependencies,
49
- isTestingTarget: false
46
+ dependencies: integrationTestsDependencies
50
47
)
51
48
)
52
49
}
@@ -59,30 +56,15 @@ public enum Module: String, CaseIterable {
59
56
}
60
57
61
58
public var targets : [ Target ] {
62
- var targets : [ Target ] = sourceTargets
63
-
64
- if let testingTargetName {
65
- targets. append (
66
- target (
67
- name: testingTargetName,
68
- product: product,
69
- dependencies: testingDependencies,
70
- isTestingTarget: true
71
- )
72
- )
73
- }
74
-
75
- return targets + testTargets
59
+ return sourceTargets + testTargets
76
60
}
77
61
78
62
public var sourceTargets : [ Target ] {
79
- let isStaticProduct = product == . staticLibrary || product == . staticFramework
80
63
return [
81
64
target (
82
65
name: targetName,
83
66
product: product,
84
- dependencies: dependencies,
85
- isTestingTarget: false
67
+ dependencies: dependencies
86
68
) ,
87
69
]
88
70
}
@@ -94,13 +76,6 @@ public enum Module: String, CaseIterable {
94
76
}
95
77
}
96
78
97
- public var testingTargetName : String ? {
98
- switch self {
99
- default :
100
- return " \( rawValue) Testing "
101
- }
102
- }
103
-
104
79
public var unitTestsTargetName : String ? {
105
80
switch self {
106
81
default :
@@ -159,9 +134,6 @@ public enum Module: String, CaseIterable {
159
134
]
160
135
}
161
136
dependencies = dependencies + [ . target( name: targetName) ]
162
- if let testingTargetName {
163
- dependencies. append ( . target( name: testingTargetName) )
164
- }
165
137
return dependencies
166
138
}
167
139
@@ -180,17 +152,13 @@ public enum Module: String, CaseIterable {
180
152
[ ]
181
153
}
182
154
dependencies. append ( . target( name: targetName) )
183
- if let testingTargetName {
184
- dependencies. append ( contentsOf: [ . target( name: testingTargetName) ] )
185
- }
186
155
return dependencies
187
156
}
188
157
189
158
fileprivate func target(
190
159
name: String ,
191
160
product: Product ,
192
- dependencies: [ TargetDependency ] ,
193
- isTestingTarget: Bool
161
+ dependencies: [ TargetDependency ]
194
162
) -> Target {
195
163
let rootFolder : String
196
164
switch product {
@@ -201,10 +169,6 @@ public enum Module: String, CaseIterable {
201
169
}
202
170
var debugSettings : ProjectDescription . SettingsDictionary = [ " SWIFT_ACTIVE_COMPILATION_CONDITIONS " : " $(inherited) MOCKING " ]
203
171
var releaseSettings : ProjectDescription . SettingsDictionary = [ : ]
204
- if isTestingTarget {
205
- debugSettings [ " ENABLE_TESTING_SEARCH_PATHS " ] = " YES "
206
- releaseSettings [ " ENABLE_TESTING_SEARCH_PATHS " ] = " YES "
207
- }
208
172
209
173
if let strictConcurrencySetting, product == . framework {
210
174
debugSettings [ " SWIFT_STRICT_CONCURRENCY " ] = . string( strictConcurrencySetting)
0 commit comments