-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPackage.swift
More file actions
49 lines (46 loc) · 1.46 KB
/
Copy pathPackage.swift
File metadata and controls
49 lines (46 loc) · 1.46 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
// swift-tools-version: 5.7
import PackageDescription
var globalSwiftSettings: [SwiftSetting] = []
var targets: [Target] = [
.target(
name: "WebsocketActorSystem",
dependencies: [
.product(name: "NIO", package: "swift-nio"),
.product(name: "NIOHTTP1", package: "swift-nio"),
.product(name: "NIOWebSocket", package: "swift-nio"),
.product(name: "NIOTransportServices", package: "swift-nio-transport-services"),
]
),
.testTarget(
name: "WebsocketActorSystemTests",
dependencies: ["WebsocketActorSystem"]
),
]
let package = Package(
name: "WebsocketActorSystem",
platforms: [
.macOS(.v13),
.iOS(.v16),
],
products: [
.library(
name: "WebsocketActorSystem",
targets: ["WebsocketActorSystem"]
),
],
dependencies: [
.package(url: "https://github.com/apple/swift-nio.git", from: "2.12.0"),
.package(url: "https://github.com/apple/swift-nio-transport-services.git", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
],
targets: targets.map { target in
var swiftSettings = target.swiftSettings ?? []
if target.type != .plugin {
swiftSettings.append(contentsOf: globalSwiftSettings)
}
if !swiftSettings.isEmpty {
target.swiftSettings = swiftSettings
}
return target
}
)