-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
55 lines (53 loc) · 1.7 KB
/
Copy pathPackage.swift
File metadata and controls
55 lines (53 loc) · 1.7 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
// swift-tools-version: 5.9
import PackageDescription
let package = Package(
name: "PolyMessaging",
platforms: [
.iOS(.v15),
.macOS(.v12),
],
products: [
.library(
name: "PolyMessaging",
targets: ["PolyMessaging"]
),
// Voice calling (WebRTC). Separate product so chat-only apps never pull
// the WebRTC binary.
.library(
name: "PolyVoice",
targets: ["PolyVoice"]
),
],
dependencies: [
// The maintained WebRTC xcframework.
.package(url: "https://github.com/stasel/WebRTC.git", exact: "149.0.0"),
],
targets: [
.target(
name: "PolyMessaging",
path: "Sources/PolyMessaging"
),
.target(
name: "PolyVoice",
dependencies: [
"PolyMessaging",
// WebRTC is iOS-only here: its macOS slice doesn't build under `swift build`,
// and keeping it off macOS lets the messaging test suite keep running there.
.product(name: "WebRTC", package: "WebRTC", condition: .when(platforms: [.iOS])),
],
path: "Sources/PolyVoice"
),
.testTarget(
name: "PolyMessagingTests",
dependencies: ["PolyMessaging"],
path: "Tests/PolyMessagingTests"
),
// Compiles the real (iOS-only) voice implementation; the tests are no-ops
// on macOS and run for real under an iOS-simulator `xcodebuild test`.
.testTarget(
name: "PolyVoiceTests",
dependencies: ["PolyVoice", "PolyMessaging"],
path: "Tests/PolyVoiceTests"
),
]
)