-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
108 lines (105 loc) · 3.29 KB
/
Copy pathPackage.swift
File metadata and controls
108 lines (105 loc) · 3.29 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
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let debugConcurrencySettings: [SwiftSetting] = [
.unsafeFlags([
"-Xfrontend", "-warn-concurrency",
"-Xfrontend", "-enable-actor-data-race-checks",
], .when(configuration: .debug))
]
let package = Package(
name: "SwiftStateMachine",
platforms: [
.iOS(.v16),
.macOS(.v13)
],
products: [
.library(
name: "SwiftStateMachine",
targets: [
"StateMachineBroadcast",
"StateMachineCore",
"StateMachineDump",
"StateMachineTest"
]
),
.library(name: "StateMachineCore", targets: ["StateMachineCore"]),
.library(name: "StateMachineBroadcast", targets: ["StateMachineBroadcast"]),
.library(name: "StateMachineDump", targets: ["StateMachineDump"]),
.library(name: "StateMachineTest", targets: ["StateMachineTest"])
],
dependencies: [
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay.git", exact: "1.4.2"),
.package(url: "https://github.com/apple/swift-collections.git", exact: "1.5.1")
],
targets: [
// Enable strict concurrency diagnostics in Debug to surface Sendable and isolation issues early.
// Keep Release clean for distribution until the public API is fully audited.
.target(
name: "StateMachineShared",
dependencies: [
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay")
],
path: "Sources/Shared",
swiftSettings: debugConcurrencySettings
),
.target(
name: "StateMachineCore",
dependencies: [
.product(name: "DequeModule", package: "swift-collections"),
"StateMachineShared"
],
path: "Sources/Core",
swiftSettings: debugConcurrencySettings
),
.target(
name: "StateMachineBroadcast",
dependencies: [
"StateMachineCore"
],
path: "Sources/Broadcast",
swiftSettings: debugConcurrencySettings
),
.target(
name: "StateMachineDump",
dependencies: [
.product(name: "OrderedCollections", package: "swift-collections"),
"StateMachineCore"
],
path: "Sources/Dump",
swiftSettings: debugConcurrencySettings
),
.target(
name: "StateMachineTest",
dependencies: [
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
.product(name: "OrderedCollections", package: "swift-collections"),
"StateMachineCore",
"StateMachineShared"
],
path: "Sources/Test",
swiftSettings: debugConcurrencySettings
),
.testTarget(
name: "StateMachineTests",
dependencies: [
"StateMachineBroadcast",
"StateMachineCore",
"StateMachineDump",
"StateMachineShared",
"StateMachineTest"
],
path: "Tests",
exclude: ["ExternalFixture"],
swiftSettings: debugConcurrencySettings
),
// Compiles and runs only against the public Core product. This prevents
// package-internal tests from masking public API regressions.
.testTarget(
name: "StateMachineExternalFixtureTests",
dependencies: ["StateMachineCore"],
path: "Tests/ExternalFixture",
swiftSettings: debugConcurrencySettings
)
]
)