-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Package.swift
70 lines (66 loc) · 2.97 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
// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let swiftSettings: [SwiftSetting] = [.enableExperimentalFeature("StrictConcurrency=complete")]
let package = Package(
name: "swift-websocket",
platforms: [.macOS(.v13), .iOS(.v16), .tvOS(.v16)],
products: [
.library(name: "WSClient", targets: ["WSClient"]),
.library(name: "WSCompression", targets: ["WSCompression"]),
.library(name: "WSCore", targets: ["WSCore"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-http-types.git", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.4.0"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.77.0"),
.package(url: "https://github.com/apple/swift-nio-extras.git", from: "1.22.0"),
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.5.0"),
.package(url: "https://github.com/apple/swift-nio-transport-services.git", from: "1.20.0"),
.package(url: "https://github.com/adam-fowler/compress-nio.git", from: "1.3.0"),
.package(url: "https://github.com/swift-server/swift-service-lifecycle", from: "2.0.0"),
],
targets: [
.target(
name: "WSClient",
dependencies: [
.byName(name: "WSCore"),
.product(name: "HTTPTypes", package: "swift-http-types"),
.product(name: "Logging", package: "swift-log"),
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOHTTPTypesHTTP1", package: "swift-nio-extras"),
.product(name: "NIOPosix", package: "swift-nio"),
.product(name: "NIOSSL", package: "swift-nio-ssl"),
.product(name: "NIOTransportServices", package: "swift-nio-transport-services"),
.product(name: "NIOWebSocket", package: "swift-nio"),
],
swiftSettings: swiftSettings
),
.target(
name: "WSCore",
dependencies: [
.product(name: "HTTPTypes", package: "swift-http-types"),
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOWebSocket", package: "swift-nio"),
.product(name: "ServiceLifecycle", package: "swift-service-lifecycle"),
],
swiftSettings: swiftSettings
),
.target(
name: "WSCompression",
dependencies: [
.byName(name: "WSCore"),
.product(name: "CompressNIO", package: "compress-nio"),
],
swiftSettings: swiftSettings
),
.testTarget(
name: "WebSocketTests",
dependencies: [
.byName(name: "WSClient"),
.byName(name: "WSCompression"),
]
),
],
swiftLanguageVersions: [.v5, .version("6")]
)