Skip to content

Commit b7a21b4

Browse files
committed
add Features package
1 parent 6aabcd4 commit b7a21b4

File tree

7 files changed

+114
-5
lines changed

7 files changed

+114
-5
lines changed

Features/.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
xcuserdata/
5+
DerivedData/
6+
.swiftpm/configuration/registries.json
7+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
8+
.netrc

Features/Package.swift

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// swift-tools-version: 6.0
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "Features",
8+
platforms: [.iOS(.v18), .macOS(.v15)],
9+
products: [
10+
// Products define the executables and libraries a package produces, making them visible to other packages.
11+
.library(
12+
name: "MidoriFeatures",
13+
targets: ["MidoriFeatures"]
14+
),
15+
],
16+
dependencies: [
17+
.package(url: "https://github.com/pointfreeco/swift-composable-architecture", from: "1.17.1"),
18+
],
19+
targets: [
20+
// Targets are the basic building blocks of a package, defining a module or a test suite.
21+
// Targets can depend on other targets in this package and products from dependencies.
22+
.target(
23+
name: "MidoriFeatures",
24+
dependencies: [
25+
.product(name: "ComposableArchitecture", package: "swift-composable-architecture"),
26+
],
27+
path: "Sources/Features"
28+
),
29+
.testTarget(
30+
name: "MidoriFeaturesTests",
31+
dependencies: ["MidoriFeatures"],
32+
path: "Tests/FeaturesTests"
33+
),
34+
]
35+
)
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// The Swift Programming Language
2+
// https://docs.swift.org/swift-book
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@testable import Features
2+
import Testing
3+
4+
@Test func example() async throws {
5+
// Write your test here and use APIs like `#expect(...)` to check expected conditions.
6+
}

Midori.xcodeproj/project.pbxproj

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
53D520DD2CC243CC005CD999 /* App */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = App; sourceTree = "<group>"; };
2323
53D520EF2CC27036005CD999 /* MangaDexAPIClient */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = MangaDexAPIClient; sourceTree = "<group>"; };
2424
53DD243F2D1C5F0600E47383 /* MangaDexAuth */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = MangaDexAuth; sourceTree = "<group>"; };
25+
53DDA3D42D3F929800A7EFC2 /* Features */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Features; sourceTree = "<group>"; };
2526
/* End PBXFileReference section */
2627

2728
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
@@ -74,6 +75,7 @@
7475
isa = PBXGroup;
7576
children = (
7677
53D520DD2CC243CC005CD999 /* App */,
78+
53DDA3D42D3F929800A7EFC2 /* Features */,
7779
53D520EF2CC27036005CD999 /* MangaDexAPIClient */,
7880
53DD243F2D1C5F0600E47383 /* MangaDexAuth */,
7981
53D520DA2CC2422A005CD999 /* Services */,

Midori.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

+59-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"originHash" : "14ed3e6aa30f069d5726cc5ac5809359d64aba4a0000f56c900a94b93b65b5b2",
2+
"originHash" : "ec77d342f7519fb07103dd1a63bb13b63fd20bfaa37a9bc11ba0b83249949636",
33
"pins" : [
44
{
55
"identity" : "combine-schedulers",
@@ -73,6 +73,15 @@
7373
"version" : "1.0.2"
7474
}
7575
},
76+
{
77+
"identity" : "swift-case-paths",
78+
"kind" : "remoteSourceControl",
79+
"location" : "https://github.com/pointfreeco/swift-case-paths",
80+
"state" : {
81+
"revision" : "e7039aaa4d9cf386fa8324a89f258c3f2c54d751",
82+
"version" : "1.6.0"
83+
}
84+
},
7685
{
7786
"identity" : "swift-clocks",
7887
"kind" : "remoteSourceControl",
@@ -91,6 +100,15 @@
91100
"version" : "1.1.4"
92101
}
93102
},
103+
{
104+
"identity" : "swift-composable-architecture",
105+
"kind" : "remoteSourceControl",
106+
"location" : "https://github.com/pointfreeco/swift-composable-architecture",
107+
"state" : {
108+
"revision" : "2ebda6ae2b155a5c3d75aff5f6d25c024bc91311",
109+
"version" : "1.17.1"
110+
}
111+
},
94112
{
95113
"identity" : "swift-concurrency-extras",
96114
"kind" : "remoteSourceControl",
@@ -100,13 +118,22 @@
100118
"version" : "1.2.0"
101119
}
102120
},
121+
{
122+
"identity" : "swift-custom-dump",
123+
"kind" : "remoteSourceControl",
124+
"location" : "https://github.com/pointfreeco/swift-custom-dump",
125+
"state" : {
126+
"revision" : "82645ec760917961cfa08c9c0c7104a57a0fa4b1",
127+
"version" : "1.3.3"
128+
}
129+
},
103130
{
104131
"identity" : "swift-dependencies",
105132
"kind" : "remoteSourceControl",
106133
"location" : "https://github.com/pointfreeco/swift-dependencies",
107134
"state" : {
108-
"revision" : "0fc0255e780bf742abeef29dec80924f5f0ae7b9",
109-
"version" : "1.4.1"
135+
"revision" : "85f89f5d0ce5a18945f65371d40ca997da85a41a",
136+
"version" : "1.6.3"
110137
}
111138
},
112139
{
@@ -118,6 +145,15 @@
118145
"version" : "1.1.0"
119146
}
120147
},
148+
{
149+
"identity" : "swift-navigation",
150+
"kind" : "remoteSourceControl",
151+
"location" : "https://github.com/pointfreeco/swift-navigation",
152+
"state" : {
153+
"revision" : "e28911721538fa0c2439e92320bad13e3200866f",
154+
"version" : "2.2.3"
155+
}
156+
},
121157
{
122158
"identity" : "swift-nonempty",
123159
"kind" : "remoteSourceControl",
@@ -136,6 +172,24 @@
136172
"version" : "1.0.2"
137173
}
138174
},
175+
{
176+
"identity" : "swift-perception",
177+
"kind" : "remoteSourceControl",
178+
"location" : "https://github.com/pointfreeco/swift-perception",
179+
"state" : {
180+
"revision" : "9e9ec5177724e78de1ecfd5b7bf881ae027be4ac",
181+
"version" : "1.4.2"
182+
}
183+
},
184+
{
185+
"identity" : "swift-sharing",
186+
"kind" : "remoteSourceControl",
187+
"location" : "https://github.com/pointfreeco/swift-sharing",
188+
"state" : {
189+
"revision" : "641edfa456fa6a927d12137c38fc71cbd9861be0",
190+
"version" : "2.1.0"
191+
}
192+
},
139193
{
140194
"identity" : "swift-syntax",
141195
"kind" : "remoteSourceControl",
@@ -150,8 +204,8 @@
150204
"kind" : "remoteSourceControl",
151205
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
152206
"state" : {
153-
"revision" : "770f990d3e4eececb57ac04a6076e22f8c97daeb",
154-
"version" : "1.4.2"
207+
"revision" : "a3f634d1a409c7979cabc0a71b3f26ffa9fc8af1",
208+
"version" : "1.4.3"
155209
}
156210
}
157211
],

UI/Package.swift

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ let package = Package(
1717
],
1818
dependencies: [
1919
.package(path: "ViewModels"),
20+
.package(path: "Features"),
2021
.package(url: "https://github.com/kean/Nuke", from: "12.8.0"),
2122
.package(url: "https://github.com/SnapKit/SnapKit", from: "5.7.1"),
2223
.package(url: "https://github.com/apple/swift-numerics", from: "1.0.2"),
@@ -28,6 +29,7 @@ let package = Package(
2829
name: "MidoriUI",
2930
dependencies: [
3031
.product(name: "MidoriViewModels", package: "ViewModels"),
32+
.product(name: "MidoriFeatures", package: "Features"),
3133
.product(name: "Nuke", package: "Nuke"),
3234
.product(name: "NukeUI", package: "Nuke"),
3335
.product(name: "SnapKit", package: "SnapKit"),

0 commit comments

Comments
 (0)