forked from Orange-OpenSource/ouds-ios
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
132 lines (126 loc) · 4.79 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
127
128
129
130
131
132
// swift-tools-version: 5.10
//
// 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: "OUDSModules",
targets: ["OUDSModules"]),
.library(
name: "OUDSComponents",
targets: ["OUDSComponents"]),
.library(
name: "OUDSThemesSosh",
targets: ["OUDSThemesSosh"]),
.library(
name: "OUDSThemesInverse",
targets: ["OUDSThemesInverse"]),
.library(
name: "OUDSThemesOrange",
targets: ["OUDSThemesOrange"]),
.library(
name: "OUDSThemesCommons",
targets: ["OUDSThemesCommons"]),
.library(
name: "OUDSTokensComponent",
targets: ["OUDSTokensComponent"]),
.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: "OUDSModules",
dependencies: ["OUDSComponents"],
path: "OUDS/Modules/Sources"),
.target(
name: "OUDSComponents",
dependencies: ["OUDSTokensComponent", "OUDSThemesOrange"],
path: "OUDS/Core/Components/Sources"),
.target(
name: "OUDSThemesSosh",
dependencies: ["OUDSThemesCommons"],
path: "OUDS/Core/Themes/Sosh/Sources"),
.testTarget(
name: "Theme-Tests-Sosh",
dependencies: ["TestsUtils", "OUDSThemesSosh"],
path: "OUDS/Core/Themes/Sosh/Tests"),
.target(
name: "OUDSThemesInverse",
dependencies: ["OUDSThemesOrange"],
path: "OUDS/Core/Themes/Inverse/Sources"),
.testTarget(
name: "Theme-Tests-Inverse",
dependencies: ["OUDSThemesInverse"],
path: "OUDS/Core/Themes/Inverse/Tests"),
.target(
name: "OUDSThemesOrange",
dependencies: ["OUDSThemesCommons"],
path: "OUDS/Core/Themes/Orange/Sources"),
.testTarget(
name: "Theme-Tests-Orange",
dependencies: ["TestsUtils", "OUDSThemesOrange"],
path: "OUDS/Core/Themes/Orange/Tests"),
.target(
name: "OUDSThemesCommons",
dependencies: ["OUDSTokensRaw", "OUDSTokensSemantic", "OUDSTokensComponent"],
path: "OUDS/Core/Themes/Commons/Sources"),
.testTarget(
name: "Theme-Tests-Commons",
dependencies: ["OUDSThemesCommons"],
path: "OUDS/Core/Themes/Commons/Tests"),
.target(
name: "OUDSTokensComponent",
dependencies: ["OUDSTokensSemantic"],
path: "OUDS/Core/Tokens/ComponentTokens/Sources"),
.target(
name: "OUDSTokensSemantic",
dependencies: ["OUDSTokensRaw"],
path: "OUDS/Core/Tokens/SemanticTokens/Sources"),
.target(
name: "OUDSTokensRaw",
dependencies: ["OUDSFoundations"],
path: "OUDS/Core/Tokens/RawTokens/Sources"),
.testTarget(
name: "Raw-Tokens-Tests",
dependencies: ["TestsUtils", "OUDSTokensRaw"],
path: "OUDS/Core/Tokens/RawTokens/Tests"),
.target(
name: "OUDSFoundations",
path: "OUDS/Foundations/Sources"),
.testTarget(
name: "Foundations-Tests",
dependencies: ["OUDSFoundations"],
path: "OUDS/Foundations/Tests"),
.target(
name: "TestsUtils",
path: "OUDS/Foundations/TestsUtils"),
],
swiftLanguageVersions: [.v5]
)