forked from ChimeHQ/Neon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
65 lines (61 loc) · 1.83 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
// swift-tools-version: 5.8
import PackageDescription
let package = Package(
name: "Neon",
platforms: [
.macOS(.v10_15),
.iOS(.v13),
.tvOS(.v13),
.watchOS(.v6),
.macCatalyst(.v13)
],
products: [
.library(name: "Neon", targets: ["Neon"]),
],
dependencies: [
.package(url: "https://github.com/ChimeHQ/SwiftTreeSitter", revision: "7ccb58219c3e928bf1938dd43d33fd349dc71808"),
.package(url: "https://github.com/ChimeHQ/Rearrange", from: "1.8.1"),
],
targets: [
.target(name: "ConcurrencyCompatibility"),
.target(name: "RangeState", dependencies: ["ConcurrencyCompatibility", "Rearrange"]),
.testTarget(name: "RangeStateTests", dependencies: ["RangeState"]),
.target(
name: "Neon",
dependencies: [
"ConcurrencyCompatibility",
"RangeState",
"Rearrange",
"TreeSitterClient",
.product(name: "SwiftTreeSitterLayer", package: "SwiftTreeSitter"),
]
),
.target(
name: "TreeSitterClient",
dependencies: [
"ConcurrencyCompatibility",
"RangeState",
"Rearrange",
"SwiftTreeSitter",
.product(name: "SwiftTreeSitterLayer", package: "SwiftTreeSitter"),
]
),
.target(
name: "NeonTestsTreeSitterSwift",
path: "tree-sitter-swift",
sources: ["src/parser.c", "src/scanner.c"],
publicHeadersPath: "bindings/swift",
cSettings: [.headerSearchPath("src")]
),
.testTarget(name: "NeonTests", dependencies: ["Neon"]),
.testTarget(name: "TreeSitterClientTests", dependencies: ["TreeSitterClient", "NeonTestsTreeSitterSwift"])
]
)
let swiftSettings: [SwiftSetting] = [
.enableExperimentalFeature("StrictConcurrency")
]
for target in package.targets {
var settings = target.swiftSettings ?? []
settings.append(contentsOf: swiftSettings)
target.swiftSettings = settings
}