-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
115 lines (110 loc) · 4.14 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
// swift-tools-version: 5.8
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "incontext",
platforms: [
.macOS(.v13),
],
products: [
.library(
name: "InContextCore",
targets: [
"InContextCore"
]),
.library(
name: "InContextCommand",
targets: [
"InContextCommand"
]),
],
dependencies: [
.package(path: "dependencies/hummingbird"),
.package(path: "dependencies/swift-log"),
.package(path: "dependencies/Tilt"),
.package(path: "dependencies/Tilt/LuaSwift"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.3.0"),
.package(url: "https://github.com/apple/swift-crypto.git", "1.0.0" ..< "3.0.0"),
.package(url: "https://github.com/Frizlab/FSEventsWrapper.git", from: "2.1.0"),
.package(url: "https://github.com/inseven/licensable", from: "0.0.13"),
.package(url: "https://github.com/jpsim/Yams.git", from: "5.0.6"),
.package(url: "https://github.com/jwells89/Titlecaser.git", from: "1.0.0"),
.package(url: "https://github.com/scinfu/SwiftSoup.git", from: "2.6.0"),
.package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.14.1"),
],
targets: [
.executableTarget(
name: "incontext",
dependencies: [
"InContextCore",
"InContextCommand",
]),
.target(
name: "InContextCommand",
dependencies: [
"InContextCore",
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "Hummingbird", package: "hummingbird"),
.product(name: "HummingbirdFoundation", package: "hummingbird"),
]),
.target(
name: "InContextCore",
dependencies: [
"PlatformSupport",
"Hoedown",
.product(name: "Crypto", package: "swift-crypto"),
.product(name: "FSEventsWrapper", package: "FSEventsWrapper", condition:
.when(platforms: [.macOS])),
.product(name: "Hummingbird", package: "hummingbird"),
.product(name: "HummingbirdFoundation", package: "hummingbird"),
.product(name: "Licensable", package: "licensable"),
.product(name: "Logging", package: "swift-log"),
.product(name: "SQLite", package: "SQLite.swift"),
.product(name: "SwiftSoup", package: "SwiftSoup"),
.product(name: "Tilt", package: "Tilt"),
.product(name: "Titlecaser", package: "Titlecaser"),
.product(name: "Yams", package: "Yams"),
],
resources: [
.process("Licenses"),
],
plugins: [
.plugin(name: "EmbedLuaPlugin", package: "LuaSwift")
]),
.target(
name: "PlatformSupport",
dependencies: [
.target(name: "PlatformSupportMacOS", condition: .when(platforms: [.macOS])),
.target(name: "PlatformSupportLinux", condition: .when(platforms: [.linux])),
]),
.target(
name: "PlatformSupportMacOS"),
.target(
name: "PlatformSupportLinux"),
.testTarget(
name: "InContextTests",
dependencies: [
"InContextCore"
],
resources: [
.process("Resources")
]),
.target(
name: "Hoedown",
dependencies: [],
path: "dependencies/hoedown",
sources: [
"src"
],
publicHeadersPath: "src"
)
]
)
// Enable regex literals.
let swiftSettings: [SwiftSetting] = [
.enableUpcomingFeature("BareSlashRegexLiterals"),
]
for target in package.targets {
target.swiftSettings = target.swiftSettings ?? []
target.swiftSettings?.append(contentsOf: swiftSettings)
}