-
Notifications
You must be signed in to change notification settings - Fork 32
/
Package.swift
112 lines (106 loc) · 4.57 KB
/
Package.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
107
108
109
110
111
112
// swift-tools-version: 5.9
import PackageDescription
let package = Package(
name: "Alicerce",
platforms: [
.iOS(.v13)
],
products: [
// single module product, mutually exclusive with *all* other products (which use sub-modules)!
.library(name: "AlicerceSingleModule", targets: ["Alicerce"]),
// multi module products
.library(
name: "Alicerce",
targets: [
"AlicerceAnalytics",
"AlicerceAutoLayout",
"AlicerceCore",
"AlicerceDeepLinking",
"AlicerceExtensions",
"AlicerceLogging",
"AlicerceNetwork",
"AlicerceObservers",
"AlicercePerformanceMetrics",
"AlicercePersistence",
"AlicerceStackOrchestrator",
"AlicerceView"
]
),
.library(name: "AlicerceAnalytics", targets: ["AlicerceAnalytics"]),
.library(name: "AlicerceAutoLayout", targets: ["AlicerceAutoLayout"]),
.library(name: "AlicerceCore", targets: ["AlicerceCore"]),
.library(name: "AlicerceDeepLinking", targets: ["AlicerceDeepLinking"]),
.library(name: "AlicerceExtensions", targets: ["AlicerceExtensions"]),
.library(name: "AlicerceLogging", targets: ["AlicerceLogging"]),
.library(name: "AlicerceNetwork", targets: ["AlicerceNetwork"]),
.library(name: "AlicerceObservers", targets: ["AlicerceObservers"]),
.library(name: "AlicercePerformanceMetrics", targets: ["AlicercePerformanceMetrics"]),
.library(name: "AlicercePersistence", targets: ["AlicercePersistence"]),
.library(name: "AlicerceStackOrchestrator", targets: ["AlicerceStackOrchestrator"]),
.library(name: "AlicerceView", targets: ["AlicerceView"])
],
dependencies: [
.package(url: "https://github.com/realm/SwiftLint", from: "0.54.0")
],
targets: [
// single module target, mutually exclusive with *all* other targets (which define sub-modules)!
// SingleModuleSources is a symlink to Sources, to trick SPM into not failing with overlapping sources error 👻
// https://forums.swift.org/t/spm-shared-targets-files-use-case-whats-the-alternative/38888/4
.target(name: "Alicerce", path: "SingleModuleSources"),
// multi module targets
.target(name: "AlicerceAnalytics", dependencies: ["AlicerceCore"], path: "Sources/Analytics"),
.target(name: "AlicerceAutoLayout", dependencies: ["AlicerceExtensions"], path: "Sources/AutoLayout"),
.target(
name: "AlicerceCore",
dependencies: ["AlicerceExtensions"],
path: "Sources",
exclude: [
"Analytics",
"AutoLayout",
"DeepLinking",
"Extensions",
"Logging",
"Network",
"Observers",
"PerformanceMetrics",
"Persistence",
"StackOrchestrator",
"View"
],
sources: ["Shared", "Utils"]
),
.target(name: "AlicerceDeepLinking", dependencies: ["AlicerceCore"], path: "Sources/DeepLinking"),
.target(name: "AlicerceExtensions", path: "Sources/Extensions", sources: ["Foundation", "UIKit"]),
.target(name: "AlicerceLogging", dependencies: ["AlicerceCore"], path: "Sources/Logging"),
.target(name: "AlicerceNetwork", dependencies: ["AlicerceCore"], path: "Sources/Network"),
.target(name: "AlicerceObservers", path: "Sources/Observers"),
.target(name: "AlicercePerformanceMetrics", dependencies: ["AlicerceCore"], path: "Sources/PerformanceMetrics"),
.target(
name: "AlicercePersistence",
dependencies: ["AlicerceCore", "AlicerceLogging", "AlicercePerformanceMetrics"],
path: "Sources/Persistence"
),
.target(
name: "AlicerceStackOrchestrator",
dependencies: [
"AlicerceCore",
"AlicerceLogging",
"AlicerceNetwork",
"AlicercePerformanceMetrics",
"AlicercePersistence"
],
path: "Sources/StackOrchestrator"
),
.target(name: "AlicerceView", path: "Sources/View")
],
swiftLanguageVersions: [
.version("5")
]
)
for target in package.targets {
if case .binary = target.type { continue }
target.plugins = target.plugins ?? []
target.plugins?.append(
.plugin(name: "SwiftLintPlugin", package: "SwiftLint")
)
}