|
| 1 | +// swift-tools-version:4.0 |
| 2 | + |
1 | 3 | import PackageDescription |
2 | 4 |
|
3 | 5 |
|
4 | 6 | #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) |
5 | | -let package = Package( |
6 | | - name: "JWT", |
7 | | - dependencies: [ |
8 | | - .Package(url: "https://github.com/kylef-archive/CommonCrypto.git", majorVersion: 1), |
9 | | - ], |
10 | | - exclude: [ |
11 | | - "Sources/JWT/HMACCryptoSwift.swift", |
12 | | - ] |
13 | | -) |
| 7 | +let dependencies = [ |
| 8 | + Package.Dependency.package(url: "https://github.com/kylef-archive/CommonCrypto.git", from: "1.0.0"), |
| 9 | +] |
| 10 | +let excludes = ["HMAC/HMACCryptoSwift.swift"] |
| 11 | +let targetDependencies: [Target.Dependency] = [] |
14 | 12 | #else |
| 13 | +let dependencies = [ |
| 14 | + Package.Dependency.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", from: "0.8.0"), |
| 15 | +] |
| 16 | +let excludes = ["HMAC/HMACCommonCrypto.swift"] |
| 17 | +let targetDependencies: [Target.Dependency] = ["CryptoSwift"] |
| 18 | +#endif |
| 19 | + |
| 20 | + |
15 | 21 | let package = Package( |
16 | 22 | name: "JWT", |
17 | | - dependencies: [ |
18 | | - .Package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", majorVersion: 0, minor: 8), |
| 23 | + products: [ |
| 24 | + .library(name: "JWT", targets: ["JWT"]), |
19 | 25 | ], |
20 | | - exclude: [ |
21 | | - "Sources/JWT/HMACCommonCrypto.swift", |
| 26 | + dependencies: dependencies, |
| 27 | + targets: [ |
| 28 | + .target(name: "JWA", dependencies: targetDependencies, exclude: excludes), |
| 29 | + .target(name: "JWT", dependencies: ["JWA"]), |
| 30 | + .testTarget(name: "JWATests", dependencies: ["JWA"]), |
| 31 | + .testTarget(name: "JWTTests", dependencies: ["JWT"]), |
22 | 32 | ] |
23 | 33 | ) |
24 | | -#endif |
|
0 commit comments