-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathPackage.swift
More file actions
96 lines (93 loc) · 3.09 KB
/
Package.swift
File metadata and controls
96 lines (93 loc) · 3.09 KB
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
// swift-tools-version: 6.2
import PackageDescription
// See the same comment in Sources/BUILD.bazel.
// Ideally we would define everything in Bazel
// so that users can make good use of caching and other Bazel features,
// but this currently causes duplication on our end. What we can do instead is once this tool advances
// enough so that we can even run tests from the IDE, we can remove the SPM integration entirely
// and move everything to Bazel, essentially allowing us to using this tool to develop the tool itself
// similarly to how Swift eventually started using Swift itself to build its own compiler.
let package = Package(
name: "sourcekit-bazel-bsp",
platforms: [
.macOS(.v15),
],
dependencies: [
.package(
url:
"https://github.com/swiftlang/swift-tools-protocols",
.upToNextMinor(from: "0.0.10")
),
.package(
url: "https://github.com/apple/swift-argument-parser",
.upToNextMajor(from: "1.6.2")
),
.package(
url: "https://github.com/apple/swift-protobuf.git",
.upToNextMajor(from: "1.34.1")
),
],
targets: [
.executableTarget(
name: "sourcekit-bazel-bsp",
dependencies: [
"SourceKitBazelBSP",
.product(
name: "ArgumentParser",
package: "swift-argument-parser"
),
],
),
.target(
name: "SourceKitBazelBSP",
dependencies: [
"BazelProtobufBindings",
.product(
name: "LanguageServerProtocolTransport",
package: "swift-tools-protocols"
),
.product(
name: "BuildServerProtocol",
package: "swift-tools-protocols"
),
.product(
name: "ToolsProtocolsSwiftExtensions",
package: "swift-tools-protocols"
),
.product(
name: "ArgumentParser",
package: "swift-argument-parser"
),
],
),
.testTarget(
name: "SourceKitBazelBSPTests",
dependencies: [
"SourceKitBazelBSP",
],
resources: [
.copy("Resources/aquery.pb"),
.copy("Resources/cquery.pb"),
.copy("Resources/cquery_added_files.pb"),
],
),
.target(
name: "BazelProtobufBindings",
dependencies: [
.product(name: "SwiftProtobuf", package: "swift-protobuf"),
],
exclude: [
"README.md",
"protos/analysis_v2.proto",
"protos/build.proto",
]
),
.testTarget(
name: "BazelProtobufBindingsTests",
dependencies: ["BazelProtobufBindings"],
resources: [
.copy("Resources/actions.pb"),
],
),
]
)