-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMODULE.bazel
More file actions
121 lines (109 loc) · 3.8 KB
/
Copy pathMODULE.bazel
File metadata and controls
121 lines (109 loc) · 3.8 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
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
module(
name = "scip-lsp",
version = "0.1.0",
)
bazel_dep(name = "rules_java", version = "8.12.0")
bazel_dep(name = "rules_jvm_external", version = "6.8")
bazel_dep(name = "contrib_rules_jvm", version = "0.27.0")
bazel_dep(name = "protobuf", version = "29.0", repo_name = "com_google_protobuf")
bazel_dep(name = "rules_python", version = "1.5.1")
bazel_dep(name = "rules_go", version = "0.57.0")
bazel_dep(name = "gazelle", version = "0.43.0")
bazel_dep(name = "rules_proto", version = "7.0.2")
# Maven Deps
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
artifacts = [
# SCIP Java dependencies
"com.sourcegraph:scip-java_2.13:0.10.4",
"com.sourcegraph:scip-semanticdb:0.10.4",
"com.sourcegraph:scip-java-proto:0.10.4",
"com.sourcegraph:semanticdb-java:0.10.4",
"com.sourcegraph:semanticdb-javac:0.10.4",
# Intellij dependencies
"com.jetbrains.intellij.java:java-decompiler-engine:jar:251.26094.121",
# Utility libraries
"commons-cli:commons-cli:1.5.0",
"commons-io:commons-io:2.11.0",
"org.jspecify:jspecify:0.3.0",
"org.ow2.asm:asm:9.7.1",
"org.projectlombok:lombok:1.18.38",
# Logging
"org.slf4j:slf4j-api:2.0.9",
"org.slf4j:slf4j-simple:2.0.9",
],
# Specify other Bzlmod modules that contribute to the same maven repository
# to suppress the rules_jvm_external multi-module warning during resolution.
known_contributing_modules = [
"protobuf",
"scip-lsp",
],
repositories = [
"https://repo1.maven.org/maven2/",
"https://www.jetbrains.com/intellij-repository/releases",
],
)
# Test dependencies - separate install to mark as testonly
maven.install(
name = "maven_test",
artifacts = [
"org.junit.jupiter:junit-jupiter-api:5.13.1",
"org.junit.jupiter:junit-jupiter-engine:5.13.1",
"org.junit.platform:junit-platform-launcher:1.13.1",
"org.junit.platform:junit-platform-reporting:1.13.1",
"org.mockito:mockito-core:5.18.0",
"org.mockito:mockito-inline:5.2.0",
"org.assertj:assertj-core:3.27.3",
],
# Declare known contributing modules for the shared maven repository so
# rules_jvm_external doesn't warn about cross-module contributions.
known_contributing_modules = [
"protobuf",
"scip-lsp",
],
repositories = [
"https://repo1.maven.org/maven2/",
],
)
use_repo(maven, "maven", "maven_test")
# Python toolchain setup
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.11",
)
use_repo(python, "python_3_11")
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "scip_lsp_pip_deps",
python_version = "3.11", # MUST match the python_version in python.toolchain
requirements_lock = "//:requirements.lock",
)
# Make the pip hubs available for use in BUILD files
use_repo(pip, "scip_lsp_pip_deps")
# Go Deps
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.from_file(go_mod = "//:go.mod")
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
go_deps,
"com_github_fsnotify_fsnotify",
"com_github_gofrs_uuid",
"com_github_sergi_go_diff",
"com_github_sourcegraph_scip",
"com_github_stretchr_testify",
"com_github_uber_go_tally_v4",
"dev_lsp_go_jsonrpc2",
"dev_lsp_go_protocol",
"dev_lsp_go_uri",
"in_gopkg_yaml_v3",
"org_golang_google_protobuf",
"org_uber_go_config",
"org_uber_go_fx",
"org_uber_go_goleak",
"org_uber_go_mock",
"org_uber_go_multierr",
"org_uber_go_yarpc",
"org_uber_go_zap",
)
bazel_dep(name = "bazel_gomock", version = "0.2.0")