|
| 1 | +// swift-tools-version:5.10 |
| 2 | +import PackageDescription |
| 3 | + |
| 4 | +let package = Package( |
| 5 | + name: "apnswift", |
| 6 | + platforms: [ |
| 7 | + .macOS(.v13), |
| 8 | + .iOS(.v16), |
| 9 | + .watchOS(.v9), |
| 10 | + .tvOS(.v16), |
| 11 | + ], |
| 12 | + products: [ |
| 13 | + .executable(name: "APNSExample", targets: ["APNSExample"]), |
| 14 | + .library(name: "APNS", targets: ["APNS"]), |
| 15 | + .library(name: "APNSCore", targets: ["APNSCore"]), |
| 16 | + .library(name: "APNSURLSession", targets: ["APNSURLSession"]), |
| 17 | + .library(name: "APNSTestServer", targets: ["APNSTestServer"]), |
| 18 | + ], |
| 19 | + dependencies: [ |
| 20 | + .package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"), |
| 21 | + .package(url: "https://github.com/apple/swift-crypto.git", "3.0.0"..<"5.0.0"), |
| 22 | + .package(url: "https://github.com/swift-server/async-http-client.git", from: "1.19.0"), |
| 23 | + .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"), |
| 24 | + .package(url: "https://github.com/apple/swift-nio.git", from: "2.42.0"), |
| 25 | + .package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.6.0"), |
| 26 | + .package(url: "https://github.com/apple/swift-nio-http2.git", from: "1.9.0"), |
| 27 | + ], |
| 28 | + targets: [ |
| 29 | + .executableTarget( |
| 30 | + name: "APNSExample", |
| 31 | + dependencies: [ |
| 32 | + .target(name: "APNSCore"), |
| 33 | + .target(name: "APNS"), |
| 34 | + .product(name: "Logging", package: "swift-log"), |
| 35 | + ] |
| 36 | + ), |
| 37 | + .testTarget( |
| 38 | + name: "APNSTests", |
| 39 | + dependencies: [ |
| 40 | + .target(name: "APNSCore"), |
| 41 | + .target(name: "APNS"), |
| 42 | + ] |
| 43 | + ), |
| 44 | + .target( |
| 45 | + name: "APNSCore", |
| 46 | + dependencies: [ |
| 47 | + .product(name: "Crypto", package: "swift-crypto") |
| 48 | + ] |
| 49 | + ), |
| 50 | + .target( |
| 51 | + name: "APNS", |
| 52 | + dependencies: [ |
| 53 | + .product(name: "Crypto", package: "swift-crypto"), |
| 54 | + .product(name: "AsyncHTTPClient", package: "async-http-client"), |
| 55 | + .target(name: "APNSCore"), |
| 56 | + ] |
| 57 | + ), |
| 58 | + .target( |
| 59 | + name: "APNSTestServer", |
| 60 | + dependencies: [ |
| 61 | + .product(name: "Logging", package: "swift-log"), |
| 62 | + .product(name: "Crypto", package: "swift-crypto"), |
| 63 | + .product(name: "NIOCore", package: "swift-nio"), |
| 64 | + .product(name: "NIOPosix", package: "swift-nio"), |
| 65 | + .product(name: "NIOSSL", package: "swift-nio-ssl"), |
| 66 | + .product(name: "NIOHTTP1", package: "swift-nio"), |
| 67 | + .product(name: "NIOHTTP2", package: "swift-nio-http2"), |
| 68 | + ] |
| 69 | + ), |
| 70 | + .target( |
| 71 | + name: "APNSURLSession", |
| 72 | + dependencies: [ |
| 73 | + .target(name: "APNSCore") |
| 74 | + ] |
| 75 | + ), |
| 76 | + ] |
| 77 | +) |
0 commit comments