-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMODULE.bazel
154 lines (138 loc) Β· 7.51 KB
/
MODULE.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
# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2023-2025 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.
RDF4J_VERSION = "5.1.0"
GRPC_JAVA_VERSION = "1.69.0"
# 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")
# https://github.com/protocolbuffers/protobuf/tree/main?tab=readme-ov-file#bazel-with-bzlmod
bazel_dep(name = "protobuf", version = "29.2")
# https://registry.bazel.build/modules/rules_java
bazel_dep(name = "rules_java", version = "8.6.3")
# Required by gRPC
# (from https://github.com/grpc/grpc-java/blob/8c261c3f28c7d83e1e976acfc34b62027078252b/examples/MODULE.bazel#L1)
bazel_dep(name = "googleapis", version = "0.0.0-20240819-fe8ba054a", repo_name = "com_google_googleapis")
switched_rules = use_extension("@com_google_googleapis//:extensions.bzl", "switched_rules")
switched_rules.use_languages(java = True)
# https://github.com/grpc/grpc-java/
# https://registry.bazel.build/modules/grpc-java
# TODO Bump grpc-java version to avoid ugly WARNING & DEBUG once https://github.com/grpc/grpc-java/issues/11792
# and https://github.com/grpc/grpc-java/issues/11791 are fixed (and released).
bazel_dep(name = "grpc-java", version = GRPC_JAVA_VERSION, repo_name = "io_grpc_grpc_java")
# https://github.com/bazelbuild/rules_go/blob/master/docs/go/core/bzlmod.md
bazel_dep(name = "rules_go", version = "0.51.0")
bazel_dep(name = "gazelle", version = "0.40.0")
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
# Do NOT use go_sdk.host(), see https://github.com/enola-dev/enola/issues/713
go_sdk.download(version = "1.22.4")
# https://github.com/bazelbuild/rules_jvm_external/blob/master/docs/bzlmod.md#installation
# When bumping the version here, must always run: REPIN=1 bazelisk run @enola_maven//:pin
bazel_dep(name = "rules_jvm_external", version = "6.6")
enola_maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
enola_maven.install(
# NB: Do *ALWAYS* specify a name, and NEVER use the (default) name = "maven";
# this is because it's not "namespaced" (or "scoped") like you might think it
# really should be... use the default name *WILL* cause conflicts with other modules;
# notably grpc-java! See e.g. https://github.com/bazel-contrib/rules_jvm_external/issues/916
# and https://github.com/bazel-contrib/rules_jvm_external/issues/708 for more background.
name = "enola_maven",
artifacts = [
"junit:junit:4.13.2",
# NB: Using GCP Cloud PubSub is a bit too broad, and could be refined,
# but it avoids us (TODO) having to figure out exactly which narrower
# dependencies are required. This was inspired by the grpc-java examples at
# https://github.com/grpc/grpc-java/blob/8c261c3f28c7d83e1e976acfc34b62027078252b/examples/MODULE.bazel#L24
# which should be updated when this will be refined.
"com.google.api.grpc:grpc-google-cloud-pubsub-v1:0.1.24",
"com.google.api.grpc:proto-google-cloud-pubsub-v1:0.1.24",
"com.google.auto.value:auto-value:1.11.0",
"com.google.auto.service:auto-service:1.1.1",
"com.google.auto.service:auto-service-annotations:1.1.1",
"com.google.guava:guava:33.4.0-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.29.2",
"com.google.protobuf:protobuf-java-util:4.29.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.8",
"org.yaml:snakeyaml:2.3",
"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",
"com.github.ipld:java-cid:1.3.8",
# TODO Replace with "com.github.multiformats:java-multibase:..."
# after merge of https://github.com/multiformats/java-multibase/pull/37
"com.github.vorburger:java-multibase:166578b51d",
],
# NB: Never de-activate duplicate_version_warning = "error"!
# While it can be tempting to resolve a build-time problem which
# may have occurred when changing dependencies, it will only cause
# runtime problems due to "classpath hell" later; it's ALWAYS better
# to clean versions at build time!
duplicate_version_warning = "error",
excluded_artifacts = [
# TODO Remove after merge of https://github.com/multiformats/java-multibase/pull/37
"com.github.multiformats:java-multibase",
# 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,
lock_file = "//:maven_install.json",
repositories = [
# Override legacy default https://repo1.maven.org/maven2/
"https://repo.maven.apache.org/maven2/",
# Used by Multiformats, IPFS & IPLD
"https://jitpack.io",
],
)
use_repo(enola_maven, "enola_maven")