-
Notifications
You must be signed in to change notification settings - Fork 15
/
Package.swift
160 lines (150 loc) · 6.67 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
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
// swift-tools-version:5.4
import PackageDescription
let package = Package(
name: "RSocket",
products: [
// Core
.library(name: "RSocketCore", targets: ["RSocketCore"]),
// Reactive streams
.library(name: "RSocketCombine", targets: ["RSocketCombine"]),
.library(name: "RSocketReactiveSwift", targets: ["RSocketReactiveSwift"]),
// Socket implementation
.library(name: "RSocketTSChannel", targets: ["RSocketTSChannel"]),
.library(name: "RSocketNIOChannel", targets: ["RSocketNIOChannel"]),
// Transport protocol
.library(name: "RSocketWSTransport", targets: ["RSocketWSTransport"]),
.library(name: "RSocketTCPTransport", targets: ["RSocketTCPTransport"]),
// Examples
.executable(name: "timer-client-example", targets: ["TimerClientExample"]),
.executable(name: "twitter-client-example", targets: ["TwitterClientExample"]),
.executable(name: "vanilla-client-example", targets: ["VanillaClientExample"]),
],
dependencies: [
.package(url: "https://github.com/ReactiveCocoa/ReactiveSwift.git", from: "6.6.0"),
.package(url: "https://github.com/apple/swift-nio", from: "2.32.1"),
.package(url: "https://github.com/apple/swift-nio-extras", from: "1.8.0"),
.package(url: "https://github.com/apple/swift-nio-transport-services", from: "1.9.2"),
.package(url: "https://github.com/apple/swift-nio-ssl", from: "2.10.4"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "0.4.0"),
],
targets: [
// Core
.target(name: "RSocketCore", dependencies: [
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOFoundationCompat", package: "swift-nio"),
]),
// Reactive streams
.target(name: "RSocketCombine", dependencies: ["RSocketCore"]),
.target(name: "RSocketReactiveSwift", dependencies: [
"RSocketCore",
.product(name: "ReactiveSwift", package: "ReactiveSwift")
]),
// Channel
.target(name: "RSocketTSChannel", dependencies: [
"RSocketCore",
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOTransportServices", package: "swift-nio-transport-services")
]),
.target(name: "RSocketNIOChannel", dependencies: [
"RSocketCore",
.product(name: "NIOPosix", package: "swift-nio"),
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOSSL", package: "swift-nio-ssl")
]),
// Transport protocol
.target(name: "RSocketWSTransport", dependencies: [
"RSocketCore",
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOHTTP1", package: "swift-nio"),
.product(name: "NIOWebSocket", package: "swift-nio"),
]),
.target(name: "RSocketTCPTransport", dependencies: [
"RSocketCore",
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOExtras", package: "swift-nio-extras")
]),
// Tests
.target(name: "RSocketTestUtilities", dependencies: ["RSocketCore"]),
.testTarget(name: "RSocketCoreTests", dependencies: [
"RSocketCore",
"RSocketTestUtilities",
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOPosix", package: "swift-nio"),
.product(name: "NIOEmbedded", package: "swift-nio"),
.product(name: "NIOExtras", package: "swift-nio-extras"),
.product(name: "NIOTransportServices", package: "swift-nio-transport-services"),
]),
.testTarget(name: "RSocketCorePerformanceTests", dependencies: [
"RSocketCore",
"RSocketTestUtilities",
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOPosix", package: "swift-nio"),
.product(name: "NIOExtras", package: "swift-nio-extras"),
.product(name: "NIOTransportServices", package: "swift-nio-transport-services"),
]),
.testTarget(name: "RSocketCombineTests", dependencies: ["RSocketCombine"]),
.testTarget(name: "RSocketReactiveSwiftTests", dependencies: [
"RSocketCore",
"RSocketReactiveSwift",
"RSocketTestUtilities",
"ReactiveSwift",
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOEmbedded", package: "swift-nio"),
]),
.testTarget(name: "RSocketWSTransportTests", dependencies: [
"RSocketWSTransport"
]),
.testTarget(name: "RSocketNIOChannelTests", dependencies: [
"RSocketNIOChannel",
"RSocketWSTransport",
"RSocketTestUtilities"
]),
.testTarget(name: "RSocketTSChannelTests", dependencies: [
"RSocketTSChannel",
"RSocketWSTransport",
"RSocketTestUtilities",
"RSocketCore"
]),
// Examples
.executableTarget(
name: "TimerClientExample",
dependencies: [
"RSocketCore",
"RSocketNIOChannel",
"RSocketWSTransport",
"RSocketReactiveSwift",
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "ReactiveSwift", package: "ReactiveSwift"),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
],
path: "Sources/Examples/TimerClient"
),
.executableTarget(
name: "TwitterClientExample",
dependencies: [
"RSocketCore",
"RSocketNIOChannel",
"RSocketWSTransport",
"RSocketReactiveSwift",
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "ReactiveSwift", package: "ReactiveSwift"),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
],
path: "Sources/Examples/TwitterClient"
),
.executableTarget(
name: "VanillaClientExample",
dependencies: [
"RSocketCore",
"RSocketNIOChannel",
"RSocketTCPTransport",
"RSocketReactiveSwift",
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "ReactiveSwift", package: "ReactiveSwift"),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
],
path: "Sources/Examples/VanillaClient"
),
],
swiftLanguageVersions: [.v5]
)