Skip to content

Commit 8c82f5e

Browse files
committed
AINFRA-510 - Simplify Hardware into a Swift package - Sources only
1 parent 176c9a8 commit 8c82f5e

File tree

93 files changed

+222
-672
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+222
-672
lines changed

Hardware/Hardware.xcodeproj/project.pbxproj

Lines changed: 0 additions & 602 deletions
Large diffs are not rendered by default.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1640"
4+
version = "1.7">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES"
8+
buildArchitectures = "Automatic">
9+
</BuildAction>
10+
<TestAction
11+
buildConfiguration = "Debug"
12+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
13+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
14+
shouldUseLaunchSchemeArgsEnv = "YES">
15+
<TestPlans>
16+
<TestPlanReference
17+
reference = "container:HardwareTests/HardwareTests.xctestplan"
18+
default = "YES">
19+
</TestPlanReference>
20+
</TestPlans>
21+
<Testables>
22+
<TestableReference
23+
skipped = "NO">
24+
<BuildableReference
25+
BuildableIdentifier = "primary"
26+
BlueprintIdentifier = "D88FDB0725DD216B00CB0DBD"
27+
BuildableName = "HardwareTests.xctest"
28+
BlueprintName = "HardwareTests"
29+
ReferencedContainer = "container:Hardware.xcodeproj">
30+
</BuildableReference>
31+
</TestableReference>
32+
</Testables>
33+
</TestAction>
34+
<LaunchAction
35+
buildConfiguration = "Debug"
36+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
37+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
38+
launchStyle = "0"
39+
useCustomWorkingDirectory = "NO"
40+
ignoresPersistentStateOnLaunch = "NO"
41+
debugDocumentVersioning = "YES"
42+
debugServiceExtension = "internal"
43+
allowLocationSimulation = "YES">
44+
</LaunchAction>
45+
<ProfileAction
46+
buildConfiguration = "Release"
47+
shouldUseLaunchSchemeArgsEnv = "YES"
48+
savedToolIdentifier = ""
49+
useCustomWorkingDirectory = "NO"
50+
debugDocumentVersioning = "YES">
51+
</ProfileAction>
52+
<AnalyzeAction
53+
buildConfiguration = "Debug">
54+
</AnalyzeAction>
55+
<ArchiveAction
56+
buildConfiguration = "Release"
57+
revealArchiveInOrganizer = "YES">
58+
</ArchiveAction>
59+
</Scheme>

Hardware/Hardware/Hardware.h

Lines changed: 0 additions & 11 deletions
This file was deleted.

Hardware/Hardware/Hardware.xcconfig

Lines changed: 0 additions & 1 deletion
This file was deleted.

Hardware/Hardware/Info.plist

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"configurations" : [
3+
{
4+
"id" : "395D5794-483E-4BA1-9702-5094F9A31112",
5+
"name" : "Test Scheme Action",
6+
"options" : {
7+
8+
}
9+
}
10+
],
11+
"defaultOptions" : {
12+
13+
},
14+
"testTargets" : [
15+
{
16+
"target" : {
17+
"containerPath" : "container:Hardware.xcodeproj",
18+
"identifier" : "D88FDB0725DD216B00CB0DBD",
19+
"name" : "HardwareTests"
20+
}
21+
}
22+
],
23+
"version" : 1
24+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1640"
4+
version = "1.7">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES"
8+
buildArchitectures = "Automatic">
9+
<BuildActionEntries>
10+
<BuildActionEntry
11+
buildForTesting = "YES"
12+
buildForRunning = "YES"
13+
buildForProfiling = "YES"
14+
buildForArchiving = "YES"
15+
buildForAnalyzing = "YES">
16+
<BuildableReference
17+
BuildableIdentifier = "primary"
18+
BlueprintIdentifier = "Hardware"
19+
BuildableName = "Hardware"
20+
BlueprintName = "Hardware"
21+
ReferencedContainer = "container:">
22+
</BuildableReference>
23+
</BuildActionEntry>
24+
</BuildActionEntries>
25+
</BuildAction>
26+
<TestAction
27+
buildConfiguration = "Debug"
28+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
29+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
30+
shouldUseLaunchSchemeArgsEnv = "YES"
31+
shouldAutocreateTestPlan = "YES">
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
</LaunchAction>
44+
<ProfileAction
45+
buildConfiguration = "Release"
46+
shouldUseLaunchSchemeArgsEnv = "YES"
47+
savedToolIdentifier = ""
48+
useCustomWorkingDirectory = "NO"
49+
debugDocumentVersioning = "YES">
50+
<MacroExpansion>
51+
<BuildableReference
52+
BuildableIdentifier = "primary"
53+
BlueprintIdentifier = "Hardware"
54+
BuildableName = "Hardware"
55+
BlueprintName = "Hardware"
56+
ReferencedContainer = "container:">
57+
</BuildableReference>
58+
</MacroExpansion>
59+
</ProfileAction>
60+
<AnalyzeAction
61+
buildConfiguration = "Debug">
62+
</AnalyzeAction>
63+
<ArchiveAction
64+
buildConfiguration = "Release"
65+
revealArchiveInOrganizer = "YES">
66+
</ArchiveAction>
67+
</Scheme>

Modules/Package.swift

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ let package = Package(
1919
name: "Experiments",
2020
targets: ["Experiments"]
2121
),
22+
.library(
23+
name: "Hardware",
24+
targets: ["Hardware"]
25+
),
2226
.library(
2327
name: "NetworkingCore",
2428
targets: ["NetworkingCore"]
@@ -99,6 +103,15 @@ let package = Package(
99103
.product(name: "AutomatticTracks", package: "Automattic-Tracks-iOS"),
100104
]
101105
),
106+
.target(
107+
name: "Hardware",
108+
dependencies: [
109+
"Codegen",
110+
.product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"),
111+
.product(name: "StripeTerminal", package: "stripe-terminal-ios")
112+
],
113+
resources: [.process("Resources")]
114+
),
102115
.target(
103116
name: "Networking",
104117
dependencies: [
@@ -213,7 +226,6 @@ let package = Package(
213226

214227
enum XcodeTargetNames {
215228
static let fakes = "Fakes"
216-
static let hardware = "Hardware"
217229
static let hardwareTests = "HardwareTests"
218230
static let networkingTests = "NetworkingTests"
219231
static let notificationExtension = "NotificationExtension"
@@ -235,7 +247,6 @@ enum XcodeSupport {
235247
static var products: [Product] {
236248
[
237249
XcodeTargetNames.fakes,
238-
XcodeTargetNames.hardware,
239250
XcodeTargetNames.hardwareTests,
240251
XcodeTargetNames.networkingTests,
241252
XcodeTargetNames.notificationExtension,
@@ -260,21 +271,16 @@ enum XcodeSupport {
260271
XcodeTargetNames.fakes,
261272
dependencies: [
262273
"Codegen",
274+
"Hardware",
263275
"Networking",
264276
]
265277
),
266278
.xcodeTarget(
267-
XcodeTargetNames.hardware,
279+
XcodeTargetNames.hardwareTests,
268280
dependencies: [
269-
"Codegen",
270-
.product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"),
271-
.product(name: "StripeTerminal", package: "stripe-terminal-ios")
281+
"Hardware"
272282
]
273283
),
274-
.xcodeTarget(
275-
XcodeTargetNames.hardwareTests,
276-
dependencies: [XcodeTargetNames.hardware.asDependency]
277-
),
278284
.xcodeTarget(
279285
XcodeTargetNames.networkingTests,
280286
dependencies: [
@@ -322,6 +328,7 @@ enum XcodeSupport {
322328
dependencies: [
323329
"Codegen",
324330
"Experiments",
331+
"Hardware",
325332
"Networking",
326333
"Storage",
327334
"WooFoundation",
@@ -413,6 +420,7 @@ enum XcodeSupport {
413420
XcodeTargetNames.yosemite,
414421
dependencies: [
415422
"Codegen",
423+
"Hardware",
416424
"Networking",
417425
"Storage",
418426
"WooFoundation",
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
project:
2-
file: ../../../../../Hardware/Hardware.xcodeproj
3-
target:
4-
name: Hardware
1+
sources:
2+
include:
3+
- ../../../../../Modules/Sources/Hardware/
54
templates:
65
- Models+Copiable.swifttemplate
7-
output: ../../../../../Hardware/Hardware/Model/Copiable/
6+
output: ../../../../../Modules/Sources/Hardware/Model/Copiable/
7+
args:
8+
moduleName: Hardware
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
project:
2-
file: ../../../../../Hardware/Hardware.xcodeproj
3-
target:
4-
name: Hardware
1+
sources:
2+
include:
3+
- ../../../../../Modules/Sources/Hardware/
54
templates:
65
- Fakes.swifttemplate
76
output: ../../../../../Fakes/Fakes/Hardware.generated.swift
7+
args:
8+
moduleName: Hardware

0 commit comments

Comments
 (0)