-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPackage.swift
156 lines (148 loc) · 6.35 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
// swift-tools-version:6.0
import PackageDescription
let cSettings: [CSetting] = [
.define("_GNU_SOURCE", .when(platforms: [.linux])),
]
let package = Package(
name: "Supersign",
platforms: [
.iOS(.v15),
.macOS(.v12),
],
products: [
.library(
name: "Supersign",
targets: ["Supersign"]
),
.library(
name: "SupersignCLISupport",
targets: ["SupersignCLISupport"]
),
.executable(
name: "SupersignCLI",
targets: ["SupersignCLI"]
),
],
dependencies: [
.package(url: "https://github.com/SuperchargeApp/SuperchargeCore", .upToNextMinor(from: "1.2.0")),
.package(url: "https://github.com/SuperchargeApp/SwiftyMobileDevice", .upToNextMinor(from: "1.3.1")),
.package(url: "https://github.com/kabiroberai/zsign", .upToNextMinor(from: "1.3.0")),
.package(url: "https://github.com/apple/swift-system", from: "1.4.0"),
.package(url: "https://github.com/apple/swift-http-types", from: "1.3.1"),
.package(url: "https://github.com/apple/swift-certificates", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-crypto", from: "3.9.1"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"),
.package(url: "https://github.com/apple/swift-openapi-generator", from: "1.6.0"),
.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-openapi-urlsession", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-nio", from: "2.77.0"),
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.23.0"),
.package(url: "https://github.com/swift-server/swift-openapi-async-http-client", from: "1.0.0"),
.package(url: "https://github.com/vapor/websocket-kit.git", from: "2.15.0"),
.package(url: "https://github.com/pointfreeco/swift-concurrency-extras", from: "1.3.0"),
.package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.6.2"),
.package(url: "https://github.com/attaswift/BigInt", from: "5.5.0"),
.package(url: "https://github.com/mxcl/Version", from: "2.1.0"),
.package(url: "https://github.com/jpsim/Yams", from: "5.1.3"),
// TODO: just depend on tuist/XcodeProj instead
.package(url: "https://github.com/yonaskolb/XcodeGen", from: "2.42.0"),
],
targets: [
.systemLibrary(name: "CSupersette"),
.target(
name: "CSupersign",
dependencies: [
.product(name: "OpenSSL", package: "SuperchargeCore")
],
cSettings: cSettings
),
.target(
name: "DeveloperAPI",
dependencies: [
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
],
exclude: ["openapi-generator-config.yaml", "openapi-overlay.yaml"]
),
.target(
name: "Supersign",
dependencies: [
"DeveloperAPI",
"CSupersign",
.byName(name: "CSupersette", condition: .when(platforms: [.linux])),
.product(name: "ConcurrencyExtras", package: "swift-concurrency-extras"),
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "SwiftyMobileDevice", package: "SwiftyMobileDevice"),
.product(name: "Zupersign", package: "zsign"),
.product(name: "SignerSupport", package: "SuperchargeCore"),
.product(name: "ProtoCodable", package: "SuperchargeCore"),
.product(name: "Superutils", package: "SuperchargeCore"),
.product(name: "Crypto", package: "swift-crypto"),
.product(name: "_CryptoExtras", package: "swift-crypto"),
.product(name: "X509", package: "swift-certificates"),
.product(name: "BigInt", package: "BigInt"),
.product(name: "HTTPTypes", package: "swift-http-types"),
.product(name: "HTTPTypesFoundation", package: "swift-http-types"),
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"),
.product(
name: "OpenAPIAsyncHTTPClient",
package: "swift-openapi-async-http-client",
condition: .when(platforms: [.linux])
),
.product(
name: "AsyncHTTPClient",
package: "async-http-client",
condition: .when(platforms: [.linux])
),
.product(
name: "WebSocketKit",
package: "websocket-kit",
condition: .when(platforms: [.linux])
),
],
cSettings: cSettings
),
.testTarget(
name: "SupersignTests",
dependencies: [
"Supersign",
.product(name: "SuperutilsTestSupport", package: "SuperchargeCore")
],
exclude: [
"config/config-template.json",
],
resources: [
.copy("config/config.json"),
.copy("config/test.app"),
]
),
.target(
name: "SupersignCLISupport",
dependencies: [
"SwiftyMobileDevice",
"Supersign",
"PackLib",
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "SystemPackage", package: "swift-system"),
.product(name: "NIOPosix", package: "swift-nio"),
.product(name: "Version", package: "Version"),
],
cSettings: cSettings
),
.target(
name: "PackLib",
dependencies: [
.product(name: "Yams", package: "Yams"),
.product(name: "XcodeGenKit", package: "XcodeGen", condition: .when(platforms: [.macOS])),
]
),
.executableTarget(
name: "SupersignCLI",
dependencies: [
"SwiftyMobileDevice",
"Supersign",
"SupersignCLISupport",
],
cSettings: cSettings
),
]
)