Skip to content

Commit d553a80

Browse files
[PM-28540] Add Xcodegen template for mocks target
1 parent 3af7ee4 commit d553a80

File tree

4 files changed

+23
-20
lines changed

4 files changed

+23
-20
lines changed

project-bwa.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,11 @@ targets:
203203
base:
204204
ENABLE_TESTING_SEARCH_PATHS: YES
205205
GENERATE_INFOPLIST_FILE: YES
206+
templates:
207+
- MocksTarget
208+
templateAttributes:
209+
sourcesPath: AuthenticatorShared
206210
sources:
207-
- path: AuthenticatorShared
208-
includes:
209-
- "**/Fixtures/*"
210-
- "**/Mocks/*"
211211
- path: AuthenticatorShared/Sourcery/Generated/AutoMockable.generated.swift
212212
optional: true
213213
dependencies:

project-bwk.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,10 @@ targets:
9999
ENABLE_TESTING_SEARCH_PATHS: YES
100100
INFOPLIST_FILE: AuthenticatorBridgeKit/MocksInfo.plist
101101
SWIFT_STRICT_CONCURRENCY: complete
102-
sources:
103-
- path: AuthenticatorBridgeKit
104-
includes:
105-
- "**/Fixtures/*"
106-
- "**/Mocks/*"
102+
templates:
103+
- MocksTarget
104+
templateAttributes:
105+
sourcesPath: AuthenticatorBridgeKit
107106
dependencies:
108107
- target: AuthenticatorBridgeKit
109108
- target: BitwardenKit
@@ -135,11 +134,11 @@ targets:
135134
base:
136135
ENABLE_TESTING_SEARCH_PATHS: YES
137136
INFOPLIST_FILE: BitwardenKit/Application/Mocks/Support/Info.plist
137+
templates:
138+
- MocksTarget
139+
templateAttributes:
140+
sourcesPath: BitwardenKit
138141
sources:
139-
- path: BitwardenKit
140-
includes:
141-
- "**/Fixtures/*"
142-
- "**/Mocks/*"
143142
- path: BitwardenKit/Sourcery/Generated/AutoMockable.generated.swift
144143
optional: true
145144
dependencies:

project-common.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,19 @@ targetTemplates:
4646
- "**/__Snapshots__/*"
4747
- "**/GoogleService-Info.*.plist"
4848
buildPhase: none
49+
# Adds common include/excludes for mocks targets.
50+
MocksTarget:
51+
sources:
52+
- path: ${sourcesPath}
53+
includes:
54+
- "**/Fixtures/*"
55+
- "**/Mocks/*"
4956
# Adds common include/excludes for snapshot test targets.
5057
SnapshotTestTarget:
5158
sources:
5259
- path: ${sourcesPath}
5360
includes:
5461
- "**/*SnapshotTests.*"
55-
- "**/Fixtures/*"
5662
- "**/TestHelpers/*"
5763
# Adds the Sourcery pre-build script.
5864
SourceryTarget:
@@ -78,13 +84,11 @@ targetTemplates:
7884
- "**/*ViewInspectorTests.*"
7985
includes:
8086
- "**/*Tests.*"
81-
- "**/Fixtures/*"
8287
- "**/TestHelpers/*"
8388
# Adds common include/excludes for ViewInspector test targets.
8489
ViewInspectorTestTarget:
8590
sources:
8691
- path: ${sourcesPath}
8792
includes:
8893
- "**/*ViewInspectorTests.*"
89-
- "**/Fixtures/*"
9094
- "**/TestHelpers/*"

project-pm.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,11 +376,11 @@ targets:
376376
base:
377377
ENABLE_TESTING_SEARCH_PATHS: YES
378378
GENERATE_INFOPLIST_FILE: YES
379+
templates:
380+
- MocksTarget
381+
templateAttributes:
382+
sourcesPath: BitwardenShared
379383
sources:
380-
- path: BitwardenShared
381-
includes:
382-
- "**/Fixtures/*"
383-
- "**/Mocks/*"
384384
- path: BitwardenShared/Sourcery/Generated/AutoMockable.generated.swift
385385
optional: true
386386
dependencies:

0 commit comments

Comments
 (0)