forked from swiftwasm/carton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
123 lines (121 loc) · 4.21 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
// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "carton",
platforms: [.macOS("10.15.4")],
products: [
.library(name: "SwiftToolchain", targets: ["SwiftToolchain"]),
.library(name: "CartonHelpers", targets: ["CartonHelpers"]),
.library(name: "CartonKit", targets: ["CartonKit"]),
.library(name: "CartonCLI", targets: ["CartonCLI"]),
.executable(name: "carton", targets: ["Carton"]),
.executable(name: "carton-release", targets: ["carton-release"]),
],
dependencies: [
.package(
url: "https://github.com/swift-server/async-http-client.git",
from: "1.8.1"
),
.package(
url: "https://github.com/apple/swift-argument-parser.git",
.upToNextMinor(from: "1.0.3")
),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.34.0"),
.package(
name: "SwiftPM",
url: "https://github.com/apple/swift-package-manager.git",
.branch("release/5.7")
),
.package(
url: "https://github.com/apple/swift-tools-support-core.git",
.branch("release/5.7")
),
.package(url: "https://github.com/vapor/vapor.git", from: "4.57.1"),
.package(url: "https://github.com/apple/swift-crypto.git", from: "1.1.0"),
.package(url: "https://github.com/JohnSundell/Splash.git", from: "0.16.0"),
.package(
url: "https://github.com/swiftwasm/WasmTransformer",
.upToNextMinor(from: "0.4.1")
),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module
// or a test suite. Targets can depend on other targets in this package, and on
// products in packages which this package depends on.
.executableTarget(
name: "Carton",
dependencies: [
"CartonCLI",
]
),
.target(
name: "CartonCLI",
dependencies: ["CartonKit"]
),
.target(
name: "CartonKit",
dependencies: [
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.product(name: "Crypto", package: "swift-crypto"),
.product(name: "Vapor", package: "vapor"),
"CartonHelpers",
"SwiftToolchain",
"WebDriverClient",
]
),
.target(
name: "SwiftToolchain",
dependencies: [
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.product(name: "NIOFoundationCompat", package: "swift-nio"),
.product(name: "SwiftPMDataModel-auto", package: "SwiftPM"),
"CartonHelpers",
"WasmTransformer",
]
),
.target(
name: "CartonHelpers",
dependencies: [
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
"Splash",
"WasmTransformer",
]
),
.target(name: "WebDriverClient", dependencies: [
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.product(name: "NIOFoundationCompat", package: "swift-nio"),
]),
// This target is used only for release automation tasks and
// should not be installed by `carton` users.
.executableTarget(
name: "carton-release",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
"CartonHelpers",
]
),
.testTarget(
name: "CartonTests",
dependencies: [
"Carton",
"CartonHelpers",
.product(name: "ArgumentParser", package: "swift-argument-parser"),
]
),
.testTarget(
name: "CartonCommandTests",
dependencies: [
"CartonCLI",
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.product(name: "TSCTestSupport", package: "swift-tools-support-core"),
]
),
.testTarget(name: "WebDriverClientTests", dependencies: ["WebDriverClient"]),
]
)