-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Package.swift
122 lines (120 loc) · 3.53 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
// swift-tools-version: 5.9.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "jose-swift",
platforms: [
.iOS(.v14),
.macOS(.v12),
.macCatalyst(.v14),
.tvOS(.v14),
.watchOS(.v5)
],
products: [
.library(
name: "jose-swift",
targets: [
"JSONWebKey",
"JSONWebAlgorithms",
"JSONWebEncryption",
"JSONWebSignature",
"JSONWebToken"
]
),
.library(
name: "jose-swift-docs",
targets: [
"jose-swift",
]
)
],
dependencies: [
// For `secp256k1` support
.package(url: "https://github.com/GigaBitcoin/secp256k1.swift.git", .upToNextMinor(from: "0.15.0")),
// For `AES_CBC_HMAC_SHA2`, `PBES2` and RSA DER encoding support
// Changing to a fork I made while I create a PR, since I found a bug
.package(url: "https://github.com/beatt83/CryptoSwift.git", .upToNextMinor(from: "1.8.5"))
// FOR `A256_CBC_HS512` with `ECDH-1PU-A256KW`
],
targets: [
.target(
name: "JSONWebAlgorithms",
dependencies: [
"JSONWebKey",
.product(name: "secp256k1", package: "secp256k1.swift"),
.product(name: "CryptoSwift", package: "CryptoSwift")
]
),
.testTarget(
name: "JWATests",
dependencies: ["JSONWebAlgorithms", "Tools"]
),
.target(
name: "JSONWebSignature",
dependencies: [
"JSONWebKey",
"JSONWebAlgorithms"
]
),
.testTarget(
name: "JWSTests",
dependencies: ["JSONWebSignature", "Tools"]
),
.target(
name: "JSONWebEncryption",
dependencies: [
"JSONWebAlgorithms",
"JSONWebKey",
"CryptoSwift"
]
),
.testTarget(
name: "JWETests",
dependencies: ["JSONWebEncryption", "Tools"]
),
.target(
name: "JSONWebKey",
dependencies: [
"CryptoSwift",
"Tools",
.product(name: "secp256k1", package: "secp256k1.swift"),
]
),
.testTarget(
name: "JWKTests",
dependencies: ["JSONWebKey", "Tools"]
),
.target(
name: "JSONWebToken",
dependencies: [
"JSONWebKey",
"JSONWebSignature",
"JSONWebEncryption",
"Tools"
]
),
.testTarget(
name: "JWTTests",
dependencies: ["JSONWebToken", "Tools"]
),
.testTarget(
name: "ExampleTests",
dependencies: ["JSONWebToken", "JSONWebKey", "JSONWebEncryption", "JSONWebSignature", "Tools"]
),
.target(
name: "Tools"
),
// This target exists just to build documentation it should not be used for development
.target(
name: "jose-swift",
dependencies: [
"JSONWebKey",
"JSONWebSignature",
"JSONWebAlgorithms",
"JSONWebEncryption",
"JSONWebToken"
]
),
],
swiftLanguageVersions: [.version("6"), .v5]
)