-
Notifications
You must be signed in to change notification settings - Fork 0
/
Project.swift
106 lines (96 loc) · 2.8 KB
/
Project.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import ProjectDescription
import ProjectDescriptionHelpers
import MyPlugin
private enum Module: CaseIterable {
case core
case domain
case service
case designKit
case feature
var moduleName: String {
switch self {
case .core: return "Core"
case .domain: return "Domain"
case .service: return "Service"
case .designKit: return "DesignKit"
case .feature: return "Feature"
}
}
}
private let deploymentTarget: DeploymentTarget = .iOS(targetVersion: "14.0", devices: [.iphone])
func makeConfig() -> Settings {
Settings.settings(configurations: [
.debug(
name: "Debug",
xcconfig: .relativeToRoot("Targets/PhoChak/Config/Debug.xcconfig")
),
.release(
name: "Release",
xcconfig: .relativeToRoot("Targets/PhoChak/Config/Release.xcconfig")
)
])
}
let project: Project = .init(
name: "PhoChak",
organizationName: "PhoChak",
settings: makeConfig(),
targets: [
[Project.makePhoChakAppTarget(
platform: .iOS,
dependencies: [
.target(name: Module.feature.moduleName),
.target(name: Module.service.moduleName)
],
deploymentTarget: deploymentTarget)],
Project.makePhoChakFrameworkTargets(
name: Module.core.moduleName,
platform: .iOS,
deploymentTarget: deploymentTarget,
dependencies: [
.external(name: "Swinject"),
.external(name: "RxSwift"),
.external(name: "RxRelay")
]),
Project.makePhoChakFrameworkTargets(
name: Module.domain.moduleName,
platform: .iOS,
deploymentTarget: deploymentTarget,
dependencies: [
.target(name: Module.core.moduleName)
]),
Project.makePhoChakFrameworkTargets(
name: Module.service.moduleName,
platform: .iOS,
deploymentTarget: deploymentTarget,
dependencies: [
.target(name: Module.domain.moduleName),
.external(name: "Moya"),
.external(name: "RxMoya"),
.external(name: "RxKakaoSDK")
]),
Project.makePhoChakFrameworkTargets(
name: Module.designKit.moduleName,
platform: .iOS,
deploymentTarget: deploymentTarget,
dependencies: [
.target(name: Module.domain.moduleName),
.external(name: "RxCocoa"),
.external(name: "RxSwift"),
.external(name: "Lottie")
]),
Project.makePhoChakFrameworkTargets(
name: Module.feature.moduleName,
platform: .iOS,
deploymentTarget: deploymentTarget,
dependencies: [
.target(name: Module.designKit.moduleName),
.target(name: Module.domain.moduleName),
.external(name: "RxCocoa"),
.external(name: "RxDataSources"),
.external(name: "ReactorKit"),
.external(name: "Kingfisher"),
.external(name: "SnapKit"),
.external(name: "Then")
])
].flatMap { $0 }
)