-
Notifications
You must be signed in to change notification settings - Fork 9
65 lines (62 loc) · 2.36 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
60
61
62
63
64
65
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
extension [Platform] {
static let darwin: [Platform] = [.macOS, .macCatalyst, .iOS, .tvOS, .watchOS, .visionOS]
static let nonDarwin: [Platform] = [.linux, .android, .windows, .wasi, .openbsd]
}
let package = Package(
name: "JWSETKit",
defaultLocalization: "en",
platforms: [
.iOS(.v14),
.macOS(.v11),
.tvOS(.v14),
.macCatalyst(.v14),
],
products: [
.library(
name: "JWSETKit",
targets: ["JWSETKit"]
),
],
dependencies: [
.package(url: "https://github.com/apple/swift-collections.git", .upToNextMinor(from: "1.1.0")),
.package(url: "https://github.com/apple/swift-asn1.git", .upToNextMajor(from: "1.3.1")),
.package(url: "https://github.com/apple/swift-crypto.git", .upToNextMajor(from: "3.11.1")),
.package(url: "https://github.com/apple/swift-certificates", .upToNextMajor(from: "1.7.0")),
.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", .upToNextMajor(from: "1.8.4")),
],
targets: [
.systemLibrary(
name: "Czlib",
pkgConfig: "zlib",
providers: [
.apt(["zlib1g-dev"]),
.brew(["zlib"]),
.yum(["zlib-devel"]),
]
),
.target(
name: "JWSETKit",
dependencies: [
.product(name: "Collections", package: "swift-collections"),
.product(name: "SwiftASN1", package: "swift-asn1"),
.product(name: "X509", package: "swift-certificates"),
.product(name: "Crypto", package: "swift-crypto"),
// Linux support
.product(name: "_CryptoExtras", package: "swift-crypto", condition: .when(platforms: .nonDarwin)),
.product(name: "CryptoSwift", package: "CryptoSwift", condition: .when(platforms: .nonDarwin)),
.byName(name: "Czlib"),
],
resources: [
.process("PrivacyInfo.xcprivacy"),
],
swiftSettings: [.enableUpcomingFeature("ExistentialAny")]
),
.testTarget(
name: "JWSETKitTests",
dependencies: ["JWSETKit"]
),
]
)