-
-
Notifications
You must be signed in to change notification settings - Fork 200
/
Package.swift
59 lines (55 loc) · 2.13 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
// swift-tools-version:5.6
import PackageDescription
var dependencies: [Package.Dependency] = [
.package(url: "https://github.com/CreateAPI/URLQueryEncoder.git", from: "0.2.0"),
.package(url: "https://github.com/apple/swift-crypto.git", from: "2.5.0")
]
var targetDependencies: [Target.Dependency] = [
.productItem(name: "URLQueryEncoder", package: "URLQueryEncoder"),
.productItem(name: "Crypto", package: "swift-crypto")
]
#if os(Linux)
dependencies.append(.package(url: "https://github.com/OpenCombine/OpenCombine.git", from: "0.14.0"))
targetDependencies.append(.product(name: "OpenCombine", package: "OpenCombine"))
#endif
let package = Package(
name: "AppStoreConnect-Swift-SDK",
platforms: [
.iOS(.v14),
.macOS(.v11),
.tvOS(.v14)
],
products: [
.library(name: "AppStoreConnect-Swift-SDK", targets: ["AppStoreConnect-Swift-SDK"])
],
dependencies: dependencies,
targets: [
.testTarget(name: "AppStoreConnect-Swift-SDK-Tests", dependencies: ["AppStoreConnect-Swift-SDK"], path: "Tests"),
.target(
name: "AppStoreConnect-Swift-SDK",
dependencies: targetDependencies,
path: "Sources",
exclude: ["OpenAPI/app_store_connect_api.json"]
),
.binaryTarget(
name: "create-api", // Find the URL and checksum at https://github.com/createapi/createapi/releases/latest
url: "https://github.com/CreateAPI/CreateAPI/releases/download/0.2.0/create-api.artifactbundle.zip",
checksum: "6f8a3ce099f07eb2655ccaf6f66d8c9a09b74bb2307781c4adec36609ddac009"
),
.plugin(
name: "CreateAPI",
capability: .command(
intent: .custom(
verb: "generate-open-api",
description: "Generates the OpenAPI entities and paths using CreateAPI"
),
permissions: [
.writeToPackageDirectory(reason: "To output the generated source code")
]
),
dependencies: [
.target(name: "create-api")
]
)
]
)