Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch gRPC Java from workspace to module "all in one big change" #993

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,92 @@ bazel_dep(name = "protobuf", version = "29.2", repo_name = "com_google_protobuf"
# https://registry.bazel.build/modules/rules_java
bazel_dep(name = "rules_java", version = "7.12.4")

GRPC_JAVA_VERSION = "1.69.0"

# https://github.com/grpc/grpc-java/
# https://registry.bazel.build/modules/grpc-java
# NOTE: The GRPC_GUAVA_VERSION in WORKSPACE.bazel might have to be adapted when changing version here:
bazel_dep(name = "grpc-java", version = GRPC_JAVA_VERSION, repo_name = "io_grpc_grpc_java")

# https://github.com/bazelbuild/rules_jvm_external/blob/master/docs/bzlmod.md#installation
# When bumping the version here, must always run: REPIN=1 bazel run @unpinned_maven//:pin
bazel_dep(name = "rules_jvm_external", version = "6.6")

OUR_GUAVA_VERSION = "33.3.1"

RDF4J_VERSION = "5.0.2"

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
artifacts = [
"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.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.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_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",

# TODO Document
# "com.google.errorprone:error_prone_annotations",
],
fail_if_repin_required = True,
fetch_sources = True,
generate_compat_repositories = True,
lock_file = "//:maven_install.json",
repositories = [
"https://repo.maven.apache.org/maven2/",
],
)
use_repo(maven, "maven")

# 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")
Expand Down
Loading