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 #986

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
6 changes: 6 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ 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")

# 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:
# TODO Introduce a versions.bzl to avoid duplicating the version of "grpc-java" in MODULE.bazel and here...
bazel_dep(name = "grpc-java", version = "1.69.0", 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")
Expand Down
16 changes: 2 additions & 14 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,14 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

OUR_GUAVA_VERSION = "33.3.1"

# TODO Introduce a versions.bzl to avoid duplicating the version of "grpc-java" in MODULE.bazel and here...
GRPC_JAVA_VERSION = "1.69.0"

# NOTE: The GRPC_GUAVA_VERSION needs to be adapted when GRPC_JAVA_VERSION (above) is bumped:
# NOTE: The GRPC_GUAVA_VERSION needs to be adapted when the version of "grpc-java" in MODULE.bazel is bumped:
GRPC_GUAVA_VERSION = "33.3.1"

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 = "3874ac920ad86b7a096e94c0fb17e52a9ed00982bf1fb44910d63bd9345a2fe4",
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")

# https://github.com/bazelbuild/rules_jvm_external#usage
Expand Down