Skip to content

Commit 2c04a26

Browse files
committed
AINFRA-468 - Simplify Yosemite into a Swift package
1 parent 9660145 commit 2c04a26

File tree

397 files changed

+109
-2181
lines changed

Some content is hidden

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

397 files changed

+109
-2181
lines changed

Fakes/Fakes.xcodeproj/project.pbxproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
26106B3D25FA4F6C0000DF30 /* ProductFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26106B3C25FA4F6C0000DF30 /* ProductFactory.swift */; };
1313
26CA6D2625F6C87800B01F48 /* Fakes.h in Headers */ = {isa = PBXBuildFile; fileRef = 26CA6D2425F6C87800B01F48 /* Fakes.h */; settings = {ATTRIBUTES = (Public, ); }; };
1414
26CA6D2F25F6C8FC00B01F48 /* Fake.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26CA6D2D25F6C8FB00B01F48 /* Fake.swift */; };
15-
26EEDC8D26FE1C1C00D5BA0E /* Yosemite.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26EEDC8C26FE1C1C00D5BA0E /* Yosemite.framework */; };
1615
26EEDC9026FE1C7B00D5BA0E /* Networking.generated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26EEDC8E26FE1C7B00D5BA0E /* Networking.generated.swift */; };
1716
26EEDC9126FE1C7B00D5BA0E /* Yosemite.generated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26EEDC8F26FE1C7B00D5BA0E /* Yosemite.generated.swift */; };
1817
3F2B4AC22DDC30B200E5E49C /* XcodeTarget_Fakes in Frameworks */ = {isa = PBXBuildFile; productRef = 3F2B4AC12DDC30B200E5E49C /* XcodeTarget_Fakes */; };
@@ -41,7 +40,6 @@
4140
26CA6D2425F6C87800B01F48 /* Fakes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Fakes.h; sourceTree = "<group>"; };
4241
26CA6D2525F6C87800B01F48 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4342
26CA6D2D25F6C8FB00B01F48 /* Fake.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Fake.swift; sourceTree = "<group>"; };
44-
26EEDC8C26FE1C1C00D5BA0E /* Yosemite.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Yosemite.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4543
26EEDC8E26FE1C7B00D5BA0E /* Networking.generated.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Networking.generated.swift; sourceTree = "<group>"; };
4644
26EEDC8F26FE1C7B00D5BA0E /* Yosemite.generated.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Yosemite.generated.swift; sourceTree = "<group>"; };
4745
3F37E1222DEEAC7200D8BF2B /* WooFoundationCore.generated.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WooFoundationCore.generated.swift; sourceTree = "<group>"; };
@@ -55,7 +53,6 @@
5553
buildActionMask = 2147483647;
5654
files = (
5755
3F2B4AC22DDC30B200E5E49C /* XcodeTarget_Fakes in Frameworks */,
58-
26EEDC8D26FE1C1C00D5BA0E /* Yosemite.framework in Frameworks */,
5956
);
6057
runOnlyForDeploymentPostprocessing = 0;
6158
};
@@ -108,7 +105,6 @@
108105
26CA6D3225F6C92100B01F48 /* Frameworks */ = {
109106
isa = PBXGroup;
110107
children = (
111-
26EEDC8C26FE1C1C00D5BA0E /* Yosemite.framework */,
112108
);
113109
name = Frameworks;
114110
sourceTree = "<group>";

Yosemite/Yosemite.xcodeproj/xcshareddata/xcschemes/Yosemite.xcscheme renamed to Modules/.swiftpm/xcode/xcshareddata/xcschemes/Yosemite.xcscheme

Lines changed: 12 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1620"
4-
version = "1.3">
3+
LastUpgradeVersion = "1640"
4+
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"
7-
buildImplicitDependencies = "YES">
7+
buildImplicitDependencies = "YES"
8+
buildArchitectures = "Automatic">
89
<BuildActionEntries>
910
<BuildActionEntry
1011
buildForTesting = "YES"
@@ -14,10 +15,10 @@
1415
buildForAnalyzing = "YES">
1516
<BuildableReference
1617
BuildableIdentifier = "primary"
17-
BlueprintIdentifier = "B5C9DDF42087FEC0006B910A"
18-
BuildableName = "Yosemite.framework"
18+
BlueprintIdentifier = "Yosemite"
19+
BuildableName = "Yosemite"
1920
BlueprintName = "Yosemite"
20-
ReferencedContainer = "container:Yosemite.xcodeproj">
21+
ReferencedContainer = "container:">
2122
</BuildableReference>
2223
</BuildActionEntry>
2324
</BuildActionEntries>
@@ -26,28 +27,8 @@
2627
buildConfiguration = "Debug"
2728
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2829
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
shouldUseLaunchSchemeArgsEnv = "YES">
30-
<MacroExpansion>
31-
<BuildableReference
32-
BuildableIdentifier = "primary"
33-
BlueprintIdentifier = "B5C9DDF42087FEC0006B910A"
34-
BuildableName = "Yosemite.framework"
35-
BlueprintName = "Yosemite"
36-
ReferencedContainer = "container:Yosemite.xcodeproj">
37-
</BuildableReference>
38-
</MacroExpansion>
39-
<Testables>
40-
<TestableReference
41-
skipped = "NO">
42-
<BuildableReference
43-
BuildableIdentifier = "primary"
44-
BlueprintIdentifier = "B5C9DDFD2087FEC0006B910A"
45-
BuildableName = "YosemiteTests.xctest"
46-
BlueprintName = "YosemiteTests"
47-
ReferencedContainer = "container:Yosemite.xcodeproj">
48-
</BuildableReference>
49-
</TestableReference>
50-
</Testables>
30+
shouldUseLaunchSchemeArgsEnv = "YES"
31+
shouldAutocreateTestPlan = "YES">
5132
</TestAction>
5233
<LaunchAction
5334
buildConfiguration = "Debug"
@@ -59,15 +40,6 @@
5940
debugDocumentVersioning = "YES"
6041
debugServiceExtension = "internal"
6142
allowLocationSimulation = "YES">
62-
<MacroExpansion>
63-
<BuildableReference
64-
BuildableIdentifier = "primary"
65-
BlueprintIdentifier = "B5C9DDF42087FEC0006B910A"
66-
BuildableName = "Yosemite.framework"
67-
BlueprintName = "Yosemite"
68-
ReferencedContainer = "container:Yosemite.xcodeproj">
69-
</BuildableReference>
70-
</MacroExpansion>
7143
</LaunchAction>
7244
<ProfileAction
7345
buildConfiguration = "Release"
@@ -78,10 +50,10 @@
7850
<MacroExpansion>
7951
<BuildableReference
8052
BuildableIdentifier = "primary"
81-
BlueprintIdentifier = "B5C9DDF42087FEC0006B910A"
82-
BuildableName = "Yosemite.framework"
53+
BlueprintIdentifier = "Yosemite"
54+
BuildableName = "Yosemite"
8355
BlueprintName = "Yosemite"
84-
ReferencedContainer = "container:Yosemite.xcodeproj">
56+
ReferencedContainer = "container:">
8557
</BuildableReference>
8658
</MacroExpansion>
8759
</ProfileAction>

Modules/Package.swift

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ let package = Package(
5959
name: "WPMediaPicker",
6060
targets: ["WPMediaPicker"]
6161
),
62+
.library(
63+
name: "Yosemite",
64+
targets: ["Yosemite"]
65+
),
6266
],
6367
dependencies: [
6468
.package(url: "https://github.com/Alamofire/Alamofire", from: "5.2.0"),
@@ -181,6 +185,23 @@ let package = Package(
181185
name: "WPMediaPicker",
182186
resources: [.process("Resources")]
183187
),
188+
.target(
189+
name: "Yosemite",
190+
dependencies: [
191+
"Codegen",
192+
"Hardware",
193+
"Networking",
194+
"Storage",
195+
"WooFoundation",
196+
"WordPressShared",
197+
.product(name: "Alamofire", package: "Alamofire"),
198+
.product(name: "Aztec", package: "AztecEditor-iOS"),
199+
.product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"),
200+
.product(name: "KeychainAccess", package: "KeychainAccess"),
201+
.product(name: "StripeTerminal", package: "stripe-terminal-ios"),
202+
.product(name: "WordPressEditor", package: "AztecEditor-iOS"),
203+
]
204+
),
184205
.testTarget(
185206
name: "ExperimentsTests",
186207
dependencies: [
@@ -239,7 +260,6 @@ enum XcodeTargetNames {
239260
static let wooCommerceWatchApp = "Woo Watch App"
240261
static let wordPressAuthenticator = "WordPressAuthenticator"
241262
static let wordPressAuthenticatorTests = "WordPressAuthenticatorTests"
242-
static let yosemite = "Yosemite"
243263
static let yosemiteTests = "YosemiteTests"
244264
}
245265

@@ -260,7 +280,6 @@ enum XcodeSupport {
260280
XcodeTargetNames.wooCommerceWatchApp,
261281
XcodeTargetNames.wordPressAuthenticator,
262282
XcodeTargetNames.wordPressAuthenticatorTests,
263-
XcodeTargetNames.yosemite,
264283
XcodeTargetNames.yosemiteTests
265284
].map { .supportingProduct(forXcodeTarget: $0) }
266285
}
@@ -273,6 +292,7 @@ enum XcodeSupport {
273292
"Codegen",
274293
"Hardware",
275294
"Networking",
295+
"Yosemite"
276296
]
277297
),
278298
.xcodeTarget(
@@ -297,6 +317,7 @@ enum XcodeSupport {
297317
dependencies: [
298318
"Networking",
299319
"WooFoundation",
320+
"Yosemite",
300321
.product(name: "KeychainAccess", package: "KeychainAccess"),
301322
]
302323
),
@@ -335,6 +356,7 @@ enum XcodeSupport {
335356
"WordPressShared",
336357
"WordPressUI",
337358
"WPMediaPicker",
359+
"Yosemite",
338360
.product(name: "Alamofire", package: "Alamofire"),
339361
.product(name: "Algorithms", package: "swift-algorithms"),
340362
.product(name: "AutomatticAbout", package: "AutomatticAbout-swift"),
@@ -416,31 +438,14 @@ enum XcodeSupport {
416438
XcodeTargetNames.wordPressAuthenticator.asDependency,
417439
]
418440
),
419-
.xcodeTarget(
420-
XcodeTargetNames.yosemite,
421-
dependencies: [
422-
"Codegen",
423-
"Hardware",
424-
"Networking",
425-
"Storage",
426-
"WooFoundation",
427-
"WordPressShared",
428-
.product(name: "Alamofire", package: "Alamofire"),
429-
.product(name: "Aztec", package: "AztecEditor-iOS"),
430-
.product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"),
431-
.product(name: "KeychainAccess", package: "KeychainAccess"),
432-
.product(name: "StripeTerminal", package: "stripe-terminal-ios"),
433-
.product(name: "WordPressEditor", package: "AztecEditor-iOS"),
434-
]
435-
),
436441
.xcodeTarget(
437442
XcodeTargetNames.yosemiteTests,
438443
dependencies: [
439444
"Codegen",
440445
"TestKit",
441446
"WooFoundation",
442447
"WordPressShared",
443-
XcodeTargetNames.yosemite.asDependency
448+
"Yosemite"
444449
]
445450
)
446451
]
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
project:
2-
file: ../../../../../Yosemite/Yosemite.xcodeproj
3-
target:
4-
name: Yosemite
1+
sources:
2+
include:
3+
- ../../../../../Modules/Sources/Yosemite/
54
templates:
65
- Models+Copiable.swifttemplate
7-
output: ../../../../../Yosemite/Yosemite/Model/Copiable/
6+
output: ../../../../../Modules/Sources/Yosemite/Model/Copiable/
7+
args:
8+
moduleName: Yosemite
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
project:
2-
file: ../../../../../Yosemite/Yosemite.xcodeproj
3-
target:
4-
name: Yosemite
1+
sources:
2+
include:
3+
- ../../../../../Modules/Sources/Yosemite/
54
templates:
65
- Fakes.swifttemplate
76
output: ../../../../../Fakes/Fakes/Yosemite.generated.swift
8-
7+
args:
8+
moduleName: Yosemite
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)