-
Notifications
You must be signed in to change notification settings - Fork 1
/
Package.swift
126 lines (119 loc) · 4.47 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
// swift-tools-version: 6.0
//
// Software Name: OUDS iOS
// SPDX-FileCopyrightText: Copyright (c) Orange SA
// SPDX-License-Identifier: MIT
//
// This software is distributed under the MIT license,
// the text of which is available at https://opensource.org/license/MIT/
// or see the "LICENSE" file for more details.
//
// Authors: See CONTRIBUTORS.txt
// Software description: A SwiftUI components library with code examples for Orange Unified Design System
//
import PackageDescription
/// Exposing OUDS through a Swift Package is a good start.
/// Expose it through Pod or XCFamework should be investigated later.
/// Defining here hierarchy between targets will prevent us to have cyclic dependencies and help to have seperated responsibilities.
let package = Package(
name: "OUDS",
defaultLocalization: "en",
platforms: [.iOS(.v15)],
// Products define the executables and libraries a package produces, making them visible to other packages.
products: [
.library(
name: "OUDS",
targets: ["OUDS"]),
.library(
name: "OUDSModules",
targets: ["OUDSModules"]),
.library(
name: "OUDSComponents",
targets: ["OUDSComponents"]),
.library(
name: "OUDSTokensComponent",
targets: ["OUDSTokensComponent"]),
.library(
name: "OUDSThemesInverse",
targets: ["OUDSThemesInverse"]),
.library(
name: "OUDSThemesOrange",
targets: ["OUDSThemesOrange"]),
.library(
name: "OUDSTokensSemantic",
targets: ["OUDSTokensRaw"]),
.library(
name: "OUDSTokensRaw",
targets: ["OUDSTokensRaw"]),
.library(
name: "OUDSFoundations",
targets: ["OUDSFoundations"]),
],
// 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: [
.target(
name: "OUDS",
dependencies: ["OUDSTokensRaw", "OUDSTokensSemantic", "OUDSTokensComponent"],
path: "OUDS/Core/OUDS/Sources"),
.testTarget(
name: "OUDS-Tests",
dependencies: ["OUDS"],
path: "OUDS/Core/OUDS/Tests"),
.target(
name: "OUDSModules",
dependencies: ["OUDSComponents"],
path: "OUDS/Modules/Sources"),
.target(
name: "OUDSComponents",
dependencies: ["OUDSTokensComponent", "OUDS"],
path: "OUDS/Core/Components/Sources"),
.target(
name: "OUDSThemesInverse",
dependencies: ["OUDSThemesOrange"],
path: "OUDS/Core/Themes/Inverse/Sources"),
.testTarget(
name: "OUDSThemesInverse-Tests",
dependencies: ["OUDSThemesInverse"],
path: "OUDS/Core/Themes/Inverse/Tests"),
.target(
name: "OUDSThemesOrange",
dependencies: ["OUDS"],
path: "OUDS/Core/Themes/Orange/Sources"),
.testTarget(
name: "OUDSThemesOrange-Tests",
dependencies: ["TestsUtils", "OUDSThemesOrange"],
path: "OUDS/Core/Themes/Orange/Tests"),
.target(
name: "OUDSTokensComponent",
dependencies: ["OUDSTokensSemantic"],
path: "OUDS/Core/Tokens/ComponentTokens/Sources"),
.target(
name: "OUDSTokensSemantic",
dependencies: ["OUDSTokensRaw"],
path: "OUDS/Core/Tokens/SemanticTokens/Sources"),
.testTarget(
name: "OUDSTokensSemantic-Tests",
dependencies: ["OUDSTokensSemantic"],
path: "OUDS/Core/Tokens/SemanticTokens/Tests"),
.target(
name: "OUDSTokensRaw",
dependencies: ["OUDSFoundations"],
path: "OUDS/Core/Tokens/RawTokens/Sources"),
.testTarget(
name: "OUDSTokensRaw-Tests",
dependencies: ["TestsUtils", "OUDSTokensRaw"],
path: "OUDS/Core/Tokens/RawTokens/Tests"),
.target(
name: "OUDSFoundations",
path: "OUDS/Foundations/Sources"),
.testTarget(
name: "OUDSFoundations-Tests",
dependencies: ["OUDSFoundations"],
path: "OUDS/Foundations/Tests"),
.target(
name: "TestsUtils",
path: "OUDS/Foundations/TestsUtils"),
],
swiftLanguageModes: [.v6]
)