-
Notifications
You must be signed in to change notification settings - Fork 7
/
WORKSPACE.bazel
184 lines (152 loc) Β· 7.68 KB
/
WORKSPACE.bazel
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2023-2024 The Enola <https://enola.dev> Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# see ./tools/java_toolchain/BUILD
# see https://github.com/bazelbuild/bazel/issues/20877, NB the "_definition" suffix!
register_toolchains("//tools/java_toolchain:repository_default_java_toolchain_definition")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
GRPC_JAVA_VERSION = "1.66.0"
RDF4J_VERSION = "5.0.2"
# https://github.com/grpc/grpc-java/
# https://github.com/enola-dev/enola/issues/202
# https://github.com/grpc/grpc-java/issues/10215
# TODO replace with bazel_dep in MODULE.bazel
# when https://github.com/bazelbuild/bazel-central-registry/issues/353
# (AKA https://github.com/grpc/grpc-java/issues/9559) is available.
http_archive(
name = "io_grpc_grpc_java",
sha256 = "28a10159fb36939bf09ce158ac0a5dbadf52ce2a3a47f5c1356b5fdbb9423373",
strip_prefix = "grpc-java-%s" % GRPC_JAVA_VERSION,
url = "https://github.com/grpc/grpc-java/archive/refs/tags/v%s.zip" % GRPC_JAVA_VERSION,
)
load("@io_grpc_grpc_java//:repositories.bzl", "IO_GRPC_GRPC_JAVA_ARTIFACTS", "IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS")
# load("@io_grpc_grpc_java//:repositories.bzl", "grpc_java_repositories")
# grpc_java_repositories()
# load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
# protobuf_deps()
# https://rules-proto-grpc.com/en/latest/#installation
http_archive(
name = "rules_proto_grpc",
sha256 = "2a0860a336ae836b54671cbbe0710eec17c64ef70c4c5a88ccfd47ea6e3739bd",
strip_prefix = "rules_proto_grpc-4.6.0",
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/releases/download/4.6.0/rules_proto_grpc-4.6.0.tar.gz"],
)
load("@rules_proto_grpc//:repositories.bzl", "rules_proto_grpc_repos", "rules_proto_grpc_toolchains")
rules_proto_grpc_toolchains()
rules_proto_grpc_repos()
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()
# https://rules-proto-grpc.com/en/latest/lang/doc.html#doc-markdown-compile
load("@rules_proto_grpc//doc:repositories.bzl", rules_proto_grpc_doc_repos = "doc_repos")
rules_proto_grpc_doc_repos()
# https://rules-proto-grpc.com/en/latest/lang/buf.html#buf-proto-lint-test
load("@rules_proto_grpc//buf:repositories.bzl", rules_proto_grpc_buf_repos = "buf_repos")
rules_proto_grpc_buf_repos()
# https://github.com/bazelbuild/rules_jvm_external#usage
load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps")
rules_jvm_external_deps()
load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup")
rules_jvm_external_setup()
# https://github.com/grpc/grpc-java/blob/master/examples/WORKSPACE
load("@rules_jvm_external//:defs.bzl", "maven_install")
# This is required so that we can use duplicate_version_warning (below) and fixes
# the "com.google.guava:guava has multiple versions 32.1.3-android, 33.0.0-jre" problem.
IO_GRPC_GRPC_JAVA_ARTIFACTS_WITHOUT_GUAVA = [item for item in IO_GRPC_GRPC_JAVA_ARTIFACTS if ((item != "com.google.guava:guava:33.2.1-android") and not item.startswith("com.google.errorprone:error_prone_annotations"))]
maven_install(
artifacts = IO_GRPC_GRPC_JAVA_ARTIFACTS_WITHOUT_GUAVA + [
"junit:junit:4.13.2",
"com.google.auto.service:auto-service:1.1.1",
"com.google.auto.service:auto-service-annotations:1.1.1",
"com.google.guava:guava:33.3.1-jre",
"com.google.jimfs:jimfs:1.3.0",
"com.google.truth.extensions:truth-java8-extension:1.4.4",
"com.google.truth.extensions:truth-proto-extension:1.4.4",
# Protobuf
"com.google.protobuf:protobuf-java:4.28.2",
"com.google.protobuf:protobuf-java-util:4.28.2",
# gRPC
"io.grpc:grpc-netty:%s" % GRPC_JAVA_VERSION,
"io.grpc:grpc-stub:%s" % GRPC_JAVA_VERSION,
"io.grpc:grpc-inprocess:%s" % GRPC_JAVA_VERSION,
"org.apache.tomcat:annotations-api:6.0.53", # NOT :tomcat-annotations-api
# RDF4j <https://rdf4j.org>
"org.eclipse.rdf4j:rdf4j-model:%s" % RDF4J_VERSION,
"org.eclipse.rdf4j:rdf4j-rio-jsonld:%s" % RDF4J_VERSION,
"org.eclipse.rdf4j:rdf4j-rio-turtle:%s" % RDF4J_VERSION,
# TODO Remove jackson-databind when https://github.com/eclipse-rdf4j/rdf4j/issues/4907 Link Bug is fixed!
"com.fasterxml.jackson.core:jackson-databind:2.13.5",
# kubernetes:client-java also depends on Protobuf (+gRPC?), version may need to be upgraded together
"io.kubernetes:client-java:19.0.0",
# Other
"ch.vorburger.exec:exec:3.1.5",
"com.github.java-json-tools:uri-template:0.10",
"info.picocli:picocli:4.7.5",
"org.snakeyaml:snakeyaml-engine:2.7",
"org.yaml:snakeyaml:2.2",
"org.slf4j:slf4j-jdk14:2.0.16",
"org.slf4j:slf4j-simple:2.0.16",
# Tika (unfortunately!) uses Log4j (v2) instead of SLF4j, so:
"org.apache.logging.log4j:log4j-to-jul:2.24.0",
"io.github.classgraph:classgraph:4.8.179",
"com.google.errorprone:error_prone_annotations:2.36.0",
"com.google.errorprone:error_prone_type_annotations:2.36.0",
"org.jspecify:jspecify:1.0.0",
"com.squareup.okhttp3:okhttp:4.12.0",
"com.squareup.okhttp3:logging-interceptor:4.12.0",
"dev.dirs:directories:26",
"io.github.amithkoujalgi:ollama4j:1.0.70",
"com.github.spotbugs:spotbugs-annotations:4.8.6",
"io.github.java-diff-utils:java-diff-utils:4.12",
"org.jsoup:jsoup:1.18.1",
"org.apache.tika:tika-core:3.0.0-BETA2",
"org.apache.tika:tika-parsers-standard-package:3.0.0-BETA2",
],
duplicate_version_warning = "error",
excluded_artifacts = [
# https://commons.apache.org/proper/commons-logging/ is a PITA,
# because it contains package org.apache.commons.logging, which we
# already get from org.slf4j:jcl-over-slf4j, see https://www.slf4j.org/legacy.html
"commons-logging:commons-logging",
# ROME Utils classes appear to also be included in com.rometools:rome - at least via Tika.
"com.rometools:rome-utils",
],
fail_if_repin_required = True,
fetch_sources = True,
generate_compat_repositories = True,
maven_install_json = "//:maven_install.json",
override_targets = IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS,
repositories = [
"https://repo.maven.apache.org/maven2/",
],
)
load("@maven//:compat.bzl", "compat_repositories")
compat_repositories()
load("@maven//:defs.bzl", "pinned_maven_install")
pinned_maven_install()
# https://github.com/bazelbuild/rules_closure/#setup
# TODO This is only useful after https://github.com/bazelbuild/rules_closure/issues/225
#http_archive(
# name = "io_bazel_rules_closure",
# sha256 = "9498e57368efb82b985db1ed426a767cbf1ba0398fd7aed632fc3908654e1b1e",
# strip_prefix = "rules_closure-0.12.0",
# urls = [
# "https://mirror.bazel.build/github.com/bazelbuild/rules_closure/archive/0.12.0.tar.gz",
# "https://github.com/bazelbuild/rules_closure/archive/0.12.0.tar.gz",
# ],
#)
# load("@io_bazel_rules_closure//closure:repositories.bzl", "rules_closure_dependencies", "rules_closure_toolchains")
# rules_closure_dependencies()
# rules_closure_toolchains()