@@ -5,105 +5,126 @@ import PackageDescription
5
5
6
6
let package = Package (
7
7
name: " carton " ,
8
- platforms: [ . macOS( " 10.15.4 " ) ] ,
8
+ platforms: [ . macOS( . v13 ) ] ,
9
9
products: [
10
10
. library( name: " SwiftToolchain " , targets: [ " SwiftToolchain " ] ) ,
11
11
. library( name: " CartonHelpers " , targets: [ " CartonHelpers " ] ) ,
12
12
. library( name: " CartonKit " , targets: [ " CartonKit " ] ) ,
13
13
. library( name: " CartonCLI " , targets: [ " CartonCLI " ] ) ,
14
- . executable( name: " carton " , targets: [ " Carton " ] ) ,
14
+ . executable( name: " carton " , targets: [ " carton " ] ) ,
15
15
. executable( name: " carton-release " , targets: [ " carton-release " ] ) ,
16
+ . plugin( name: " CartonBundle " , targets: [ " CartonBundle " ] ) ,
17
+ . plugin( name: " CartonTest " , targets: [ " CartonTest " ] ) ,
18
+ . plugin( name: " CartonDev " , targets: [ " CartonDev " ] ) ,
19
+ . executable( name: " carton-plugin-helper " , targets: [ " carton-plugin-helper " ] ) ,
16
20
] ,
17
21
dependencies: [
18
- . package (
19
- url: " https://github.com/swift-server/async-http-client.git " ,
20
- from: " 1.8.1 "
21
- ) ,
22
+ . package ( url: " https://github.com/apple/swift-log.git " , from: " 1.5.4 " ) ,
22
23
. package (
23
24
url: " https://github.com/apple/swift-argument-parser.git " ,
24
- . upToNextMinor( from: " 1.2.3 " )
25
+ . upToNextMinor( from: " 1.3.0 " )
25
26
) ,
26
27
. package ( url: " https://github.com/apple/swift-nio.git " , from: " 2.34.0 " ) ,
27
- . package (
28
- url: " https://github.com/apple/swift-package-manager.git " ,
29
- branch: " release/5.9 "
30
- ) ,
31
- . package (
32
- url: " https://github.com/apple/swift-tools-support-core.git " ,
33
- branch: " release/5.9 "
34
- ) ,
35
- . package ( url: " https://github.com/vapor/vapor.git " , from: " 4.57.1 " ) ,
36
- . package ( url: " https://github.com/apple/swift-crypto.git " , from: " 2.2.0 " ) ,
37
- . package ( url: " https://github.com/JohnSundell/Splash.git " , from: " 0.16.0 " ) ,
38
28
. package (
39
29
url: " https://github.com/swiftwasm/WasmTransformer " ,
40
30
. upToNextMinor( from: " 0.5.0 " )
41
31
) ,
42
32
] ,
43
33
targets: [
44
- // Targets are the basic building blocks of a package. A target can define a module
45
- // or a test suite. Targets can depend on other targets in this package, and on
46
- // products in packages which this package depends on.
47
34
. executableTarget(
48
- name: " Carton " ,
35
+ name: " carton " ,
36
+ dependencies: [
37
+ " SwiftToolchain " ,
38
+ " CartonHelpers " ,
39
+ ]
40
+ ) ,
41
+ . executableTarget(
42
+ name: " CartonFrontend " ,
49
43
dependencies: [
50
44
" CartonCLI " ,
51
45
]
52
46
) ,
47
+ . plugin(
48
+ name: " CartonBundle " ,
49
+ capability: . command(
50
+ intent: . custom(
51
+ verb: " carton-bundle " ,
52
+ description: " Produces an optimized app bundle for distribution. "
53
+ )
54
+ ) ,
55
+ dependencies: [ " CartonFrontend " ] ,
56
+ exclude: [ " CartonPluginShared/README.md " ]
57
+ ) ,
58
+ . plugin(
59
+ name: " CartonTest " ,
60
+ capability: . command(
61
+ intent: . custom(
62
+ verb: " carton-test " ,
63
+ description: " Run the tests in a WASI environment. "
64
+ )
65
+ ) ,
66
+ dependencies: [ " CartonFrontend " ] ,
67
+ exclude: [ " CartonPluginShared/README.md " ]
68
+ ) ,
69
+ . plugin(
70
+ name: " CartonDev " ,
71
+ capability: . command(
72
+ intent: . custom(
73
+ verb: " carton-dev " ,
74
+ description: " Watch the current directory, host the app, rebuild on change. "
75
+ )
76
+ ) ,
77
+ dependencies: [ " CartonFrontend " ] ,
78
+ exclude: [ " CartonPluginShared/README.md " ]
79
+ ) ,
80
+ . executableTarget( name: " carton-plugin-helper " ) ,
53
81
. target(
54
82
name: " CartonCLI " ,
55
- dependencies: [ " CartonKit " ]
83
+ dependencies: [
84
+ . product( name: " Logging " , package : " swift-log " ) ,
85
+ " CartonKit " ,
86
+ ]
56
87
) ,
57
88
. target(
58
89
name: " CartonKit " ,
59
90
dependencies: [
60
- . product( name: " AsyncHTTPClient " , package : " async-http-client " ) ,
61
- . product( name: " Crypto " , package : " swift-crypto " ) ,
62
- . product( name: " Vapor " , package : " vapor " ) ,
91
+ . product( name: " NIOWebSocket " , package : " swift-nio " ) ,
92
+ . product( name: " NIOHTTP1 " , package : " swift-nio " ) ,
93
+ . product( name: " NIO " , package : " swift-nio " ) ,
94
+ . product( name: " ArgumentParser " , package : " swift-argument-parser " ) ,
63
95
" CartonHelpers " ,
64
- " SwiftToolchain " ,
65
96
" WebDriverClient " ,
66
- ]
97
+ " WasmTransformer " ,
98
+ ] ,
99
+ exclude: [ " Utilities/README.md " ]
67
100
) ,
68
101
. target(
69
102
name: " SwiftToolchain " ,
70
103
dependencies: [
71
- . product( name: " AsyncHTTPClient " , package : " async-http-client " ) ,
72
- . product( name: " NIOFoundationCompat " , package : " swift-nio " ) ,
73
- . product( name: " SwiftPMDataModel-auto " , package : " swift-package-manager " ) ,
74
104
" CartonHelpers " ,
75
- " WasmTransformer " ,
76
- ]
105
+ ] ,
106
+ exclude : [ " Utilities/README.md " ]
77
107
) ,
78
108
. target(
79
109
name: " CartonHelpers " ,
80
- dependencies: [
81
- . product( name: " AsyncHTTPClient " , package : " async-http-client " ) ,
82
- . product( name: " ArgumentParser " , package : " swift-argument-parser " ) ,
83
- . product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
84
- " Splash " ,
85
- " WasmTransformer " ,
86
- ]
110
+ dependencies: [ ] ,
111
+ exclude: [ " Basics/README.md " ]
87
112
) ,
88
- . target( name: " WebDriverClient " , dependencies: [
89
- . product( name: " AsyncHTTPClient " , package : " async-http-client " ) ,
90
- . product( name: " NIOFoundationCompat " , package : " swift-nio " ) ,
91
- ] ) ,
113
+ . target( name: " WebDriverClient " , dependencies: [ ] ) ,
92
114
// This target is used only for release automation tasks and
93
115
// should not be installed by `carton` users.
94
116
. executableTarget(
95
117
name: " carton-release " ,
96
118
dependencies: [
97
119
. product( name: " ArgumentParser " , package : " swift-argument-parser " ) ,
98
- . product( name: " AsyncHTTPClient " , package : " async-http-client " ) ,
99
- . product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
100
120
" CartonHelpers " ,
121
+ " WasmTransformer " ,
101
122
]
102
123
) ,
103
124
. testTarget(
104
125
name: " CartonTests " ,
105
126
dependencies: [
106
- " Carton " ,
127
+ " CartonFrontend " ,
107
128
" CartonHelpers " ,
108
129
. product( name: " ArgumentParser " , package : " swift-argument-parser " ) ,
109
130
]
@@ -113,8 +134,6 @@ let package = Package(
113
134
dependencies: [
114
135
" CartonCLI " ,
115
136
. product( name: " ArgumentParser " , package : " swift-argument-parser " ) ,
116
- . product( name: " AsyncHTTPClient " , package : " async-http-client " ) ,
117
- . product( name: " TSCTestSupport " , package : " swift-tools-support-core " ) ,
118
137
]
119
138
) ,
120
139
. testTarget( name: " WebDriverClientTests " , dependencies: [ " WebDriverClient " ] ) ,
0 commit comments