Repository navigation
Expand file tree
/
Copy pathPackage.swift
More file actions
225 lines (188 loc) · 7.71 KB
/
Copy pathPackage.swift
File metadata and controls
225 lines (188 loc) · 7.71 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
// swift-tools-version: 6.3
// SPDX-FileCopyrightText: Copyright (c) Orange SA, Pierre-Yves Lapersonne
// SPDX-License-Identifier: MIT
import PackageDescription
let package = Package(
// MARK: - Package setup
name: "MISO",
defaultLocalization: "en",
platforms: [.iOS(.v15) /* and also iPadOS v15 */, .macOS(.v13), .visionOS(.v1), .watchOS(.v11), .tvOS(.v16)],
// MARK: - Products
// Products define the executables and libraries a package produces, making them visible to other packages.
products: [
// MARK: Umbrella products
// Umbrella library to improve Developer eXperience and let users use MISO in only one import
// Embeds all libraries and all themes
.library(
name: "MISOSwiftUI",
type: .dynamic,
targets: ["MISOSwiftUI"]),
// Better user of products, choose only the one users want
// Helps to isolate packages of MISO
.library(
name: "MISOThemesContract",
targets: ["MISOThemesContract"]),
.library(
name: "MISOModules",
targets: ["MISOModules"]),
.library(
name: "MISOComponents",
targets: ["MISOComponents"]),
.library(
name: "MISOTokensComponent",
targets: ["MISOTokensComponent"]),
.library(
name: "MISOTokensSemantic",
targets: ["MISOTokensSemantic"]),
.library(
name: "MISOTokensRaw",
targets: ["MISOTokensRaw"]),
.library(
name: "MISOFoundations",
targets: ["MISOFoundations"]),
// MARK: Atomic products (MISO)
.library(
name: "MISOModulesAppServices",
targets: ["MISOModulesAppServices"]),
.library(
name: "MISOThemesMISOBlueCoat",
targets: ["MISOThemesMISOBlueCoat"]),
.library(
name: "MISOThemesMISOFoxyRough",
targets: ["MISOThemesMISOFoxyRough"]),
.library(
name: "MISOComponentsMISO",
targets: ["MISOComponentsMISO"]),
.library(
name: "MISOFoundationsMISO",
targets: ["MISOFoundationsMISO"]),
],
// MARK: - Dependencies
dependencies: [
// MARK: Tooling dependencies
// Apple Swift tool to build documentation
.package(url: "https://github.com/swiftlang/swift-docc-plugin", exact: "1.5.0"),
// Linter for Swift code
.package(url: "https://github.com/SimplyDanny/SwiftLintPlugins", exact: "0.65.1"),
// Formatter for Swift code
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.63.0"),
],
// MARK: - Targets
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
targets: [
// MARK: Umbrella targets
.target(
name: "MISOSwiftUI",
dependencies: [
"MISOThemesContract",
"MISOModules",
"MISOComponents",
"MISOTokensComponent",
"MISOTokensSemantic",
"MISOTokensRaw",
"MISOFoundations",
"MISOModulesAppServices",
"MISOComponentsMISO",
"MISOThemesMISOBlueCoat",
"MISOThemesMISOFoxyRough",
"MISOFoundationsMISO",
],
path: "MISO/exported/MISO/Sources"),
// MARK: Atomic targets (OUDS)
.target(
name: "MISOThemesContract",
dependencies: ["MISOTokensRaw", "MISOTokensSemantic", "MISOTokensComponent"],
path: "MISO/Core/OUDS/ThemesContract/Sources"),
.testTarget(
name: "MISOThemesContract-Tests",
dependencies: ["MISOThemesContract", "TestsUtils"],
path: "MISO/Core/OUDS/ThemesContract/Tests"),
.target(
name: "MISOModules",
dependencies: ["MISOComponents"],
path: "MISO/Modules/OUDS/Sources"),
.target(
name: "MISOComponents",
dependencies: ["MISOTokensComponent", "MISOThemesContract"],
path: "MISO/Core/OUDS/Components/Sources",
resources: [.process("_/Resources/")]),
.testTarget(
name: "MISOComponents-Tests",
dependencies: ["MISOComponents"],
path: "MISO/Core/OUDS/Components/Tests"),
.target(
name: "MISOTokensComponent",
dependencies: ["MISOTokensSemantic"],
path: "MISO/Core/OUDS/Tokens/ComponentTokens/Sources"),
.target(
name: "MISOTokensSemantic",
dependencies: ["MISOTokensRaw"],
path: "MISO/Core/OUDS/Tokens/SemanticTokens/Sources"),
.testTarget(
name: "MISOTokensSemantic-Tests",
dependencies: ["MISOTokensSemantic"],
path: "MISO/Core/OUDS/Tokens/SemanticTokens/Tests"),
.target(
name: "MISOTokensRaw",
dependencies: ["MISOFoundations"],
path: "MISO/Core/OUDS/Tokens/RawTokens/Sources"),
.testTarget(
name: "MISOTokensRaw-Tests",
dependencies: ["TestsUtils", "MISOTokensRaw"],
path: "MISO/Core/OUDS/Tokens/RawTokens/Tests"),
.target(
name: "MISOFoundations",
path: "MISO/Foundations/OUDS/Sources"),
.testTarget(
name: "MISOFoundations-Tests",
dependencies: ["MISOFoundations"],
path: "MISO/Foundations/OUDS/Tests"),
.target(
name: "TestsUtils",
dependencies: ["MISOFoundations"],
path: "MISO/Foundations/OUDS/TestsUtils"),
// MARK: Atomic targets (MISO)
.target(
name: "MISOModulesAppServices",
dependencies: ["MISOComponents", "MISOComponentsMISO", "MISOThemesContract", "MISOFoundationsMISO"],
path: "MISO/Modules/MISO/AppServices/Sources",
resources: [.process("Resources/")]),
.testTarget(
name: "MISOModulesAppServices-Tests",
dependencies: ["TestsUtils", "MISOModulesAppServices"],
path: "MISO/Modules/MISO/AppServices/Tests"),
.target(
name: "MISOThemesMISOBlueCoat",
dependencies: ["MISOThemesContract"],
path: "MISO/Core/MISO/Themes/BlueCoat/Sources",
resources: [.process("Resources/")]),
.testTarget(
name: "MISOThemesMISOBlueCoat-Tests",
dependencies: ["TestsUtils", "MISOThemesMISOBlueCoat"],
path: "MISO/Core/MISO/Themes/BlueCoat/Tests"),
.target(
name: "MISOThemesMISOFoxyRough",
dependencies: ["MISOThemesMISOBlueCoat"],
path: "MISO/Core/MISO/Themes/FoxyRough/Sources",
resources: [.process("Resources/")]),
.testTarget(
name: "MISOThemesMISOFoxyRough-Tests",
dependencies: ["TestsUtils", "MISOThemesMISOBlueCoat", "MISOThemesMISOFoxyRough"],
path: "MISO/Core/MISO/Themes/FoxyRough/Tests"),
.target(
name: "MISOComponentsMISO",
dependencies: ["MISOComponents", "MISOFoundationsMISO"],
path: "MISO/Core/MISO/Components/Sources",
resources: [.process("Resources/")]),
.testTarget(
name: "MISOComponentsMISO-Tests",
dependencies: ["TestsUtils", "MISOComponentsMISO"],
path: "MISO/Core/MISO/Components/Tests"),
.target(
name: "MISOFoundationsMISO",
dependencies: ["MISOFoundations"],
path: "MISO/Foundations/MISO/Sources"),
],
// MARK: - Swift language modes
swiftLanguageModes: [.v6])