-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Package.swift
130 lines (120 loc) · 4.18 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
// swift-tools-version:5.6
import PackageDescription
let package = Package(
name: "swift-bundler",
platforms: [.macOS(.v10_15)],
products: [
.executable(name: "swift-bundler", targets: ["swift-bundler"]),
.library(name: "SwiftBundlerRuntime", targets: ["SwiftBundlerRuntime"]),
.plugin(name: "SwiftBundlerCommandPlugin", targets: ["SwiftBundlerCommandPlugin"]),
],
dependencies: [
.package(url: "https://github.com/stackotter/swift-arg-parser", revision: "b1b5373"),
.package(url: "https://github.com/apple/swift-log", from: "1.5.4"),
.package(url: "https://github.com/pointfreeco/swift-parsing", from: "0.7.1"),
.package(url: "https://github.com/furby-tm/TOMLKit", from: "0.5.6"),
.package(url: "https://github.com/onevcat/Rainbow", from: "3.0.0"),
.package(url: "https://github.com/mxcl/Version.git", from: "2.0.0"),
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
.package(url: "https://github.com/stackotter/XcodeGen", exact: "2.35.1"),
.package(url: "https://github.com/apple/swift-syntax", exact: "510.0.1"),
.package(url: "https://github.com/apple/swift-format", exact: "510.0.1"),
.package(url: "https://github.com/pointfreeco/swift-overture", from: "0.5.0"),
.package(url: "https://github.com/stackotter/Socket", from: "0.3.3"),
.package(url: "https://github.com/jpsim/Yams.git", from: "5.1.2"),
// File watcher dependencies
.package(url: "https://github.com/sersoft-gmbh/swift-inotify", from: "0.4.0"),
.package(url: "https://github.com/apple/swift-system.git", from: "1.2.0"),
.package(url: "https://github.com/apple/swift-async-algorithms.git", from: "0.1.0"),
],
targets: [
.executableTarget(
name: "swift-bundler",
dependencies: [
.product(name: "StackOtterArgParser", package: "swift-arg-parser"),
.product(name: "Logging", package: "swift-log"),
.product(name: "Parsing", package: "swift-parsing"),
"TOMLKit",
"Rainbow",
"Version",
"Socket",
"HotReloadingProtocol",
"FileSystemWatcher",
"Yams",
.product(name: "XcodeGenKit", package: "XcodeGen"),
.product(name: "ProjectSpec", package: "XcodeGen"),
.product(name: "SwiftSyntax", package: "swift-syntax"),
.product(name: "SwiftSyntaxBuilder", package: "swift-syntax"),
.product(name: "SwiftFormat", package: "swift-format"),
.product(name: "SwiftFormatConfiguration", package: "swift-format"),
.product(name: "Overture", package: "swift-overture"),
]
),
.executableTarget(
name: "schema-gen",
dependencies: [
.product(name: "SwiftSyntax", package: "swift-syntax"),
.product(name: "SwiftParser", package: "swift-syntax"),
]
),
.target(
name: "SwiftBundlerRuntime",
dependencies: [
"Socket",
"HotReloadingProtocol",
]
),
.target(
name: "HotReloadingProtocol",
dependencies: [
"Socket"
]
),
.target(
name: "FileSystemWatcher",
dependencies: [
.product(
name: "Inotify",
package: "swift-inotify",
condition: .when(platforms: [.linux])
),
.product(
name: "SystemPackage",
package: "swift-system",
condition: .when(platforms: [.linux])
),
.product(
name: "AsyncAlgorithms",
package: "swift-async-algorithms",
condition: .when(platforms: [.linux])
),
]
),
.testTarget(
name: "SwiftBundlerTests",
dependencies: ["swift-bundler"]
),
// The target containing documentation
.target(
name: "SwiftBundler",
path: "Documentation",
exclude: ["preview_docs.sh"]
),
.plugin(
name: "SwiftBundlerCommandPlugin",
capability: .command(
intent: .custom(
verb: "bundler",
description: "Run a package as an app."
),
permissions: [
.writeToPackageDirectory(
reason: "Creating an app bundle requires writing to the package directory.")
]
),
dependencies: [
.target(name: "swift-bundler")
]
),
]
)