-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
59 lines (55 loc) · 2.42 KB
/
Package.swift
File metadata and controls
59 lines (55 loc) · 2.42 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
// swift-tools-version: 5.9
import PackageDescription
let protobufMinVersion: Version = "1.29.0"
let psshMinVersion: Version = "1.2.2"
let rsaMinVersion: Version = "2.6.1"
#if targetEnvironment(simulator) || targetEnvironment(macCatalyst) || os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
//Exclude CryptoSwift package (used built-in CommonCrypto)
let dependencies: [Package.Dependency] = [
.package(url: "https://github.com/apple/swift-protobuf.git", from: protobufMinVersion),
.package(url: "https://github.com/mIwr/SwPSSH.git", from: psshMinVersion),
.package(url: "https://github.com/mIwr/SwiftRSA.git", from: rsaMinVersion)
]
let mainTargetDependencies: [Target.Dependency] = [
.product(name: "SwiftProtobuf", package: "swift-protobuf"),
.product(name: "SwPSSH", package: "SwPSSH"),
.product(name: "SwiftRSA", package: "SwiftRSA")
]
#else
let dependencies: [Package.Dependency] = [
.package(url: "https://github.com/apple/swift-protobuf.git", from: protobufMinVersion),
.package(url: "https://github.com/mIwr/SwPSSH.git", from: psshMinVersion),
.package(url: "https://github.com/mIwr/SwiftRSA.git", from: rsaMinVersion),
.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", from: "1.8.4")
]
let mainTargetDependencies: [Target.Dependency] = [
.product(name: "SwiftProtobuf", package: "swift-protobuf"),
.product(name: "SwPSSH", package: "SwPSSH"),
.product(name: "SwiftRSA", package: "SwiftRSA"),
.product(name: "CryptoSwift", package: "CryptoSwift")
]
#endif
let package = Package(
name: "SwWidevine",
platforms: [
.macOS(.v10_13), .macCatalyst(.v13), .iOS(.v11), .tvOS(.v11), .watchOS(.v5), .visionOS(.v1)
],
products: [
.library(
name: "SwWidevine",
targets: ["SwWidevine"]),
],
dependencies: dependencies,
targets: [
.target(name: "SwWidevine", dependencies: mainTargetDependencies, resources: [.copy("PrivacyInfo.xcprivacy")]),
.testTarget(name: "SwWidevineTests", dependencies: ["SwWidevine"], exclude: ["TestConstantsXCodeEnvExt.swift"], resources: [
.process("appCrt.protobuf"),
.process("deviceClID.protobuf"),
.process("licRequest.protobuf"),
.process("licResponse.protobuf"),
.process("licReqSelfGenerated.protobuf"),
.process("licRespBySelfGenerated.protobuf"),
]),
],
swiftLanguageVersions: [.v5]
)