Skip to content

Commit

Permalink
Add //third_party/java/grpc:api and switch `//third_party/java/grpc…
Browse files Browse the repository at this point in the history
…:context` to just export it (maybe we can just get rid of it).

At some point between the old version of gRPC that Bazel Common used and the newest one, the `grpc-context` artifact was replaced or folded into `grpc-api`. It seems like the new releases of gRPC continue to have a `grpc-context` artifact, but its jar file contains no classes.

PiperOrigin-RevId: 573302458
  • Loading branch information
cgdecker authored and Google Java Core Libraries committed Oct 13, 2023
1 parent 78cc736 commit a482a3a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion third_party/java/grpc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ java_library(
exports = ["@io_grpc_grpc_all//jar"],
)

java_library(
name = "api",
exports = ["@io_grpc_grpc_api//jar"],
)

java_library(
name = "core",
exports = ["@io_grpc_grpc_core//jar"],
Expand All @@ -35,7 +40,7 @@ java_library(

java_library(
name = "context",
exports = ["@io_grpc_grpc_context//jar"],
exports = [":api"],
)

java_library(
Expand Down
8 changes: 8 additions & 0 deletions workspace_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,14 @@ def google_common_workspace_rules():
)

GRPC_VERSION = "1.58.0"
maven_import(
group_id = "io.grpc",
artifact_id = "grpc-api",
version = GRPC_VERSION,
licenses = ["notice"],
sha256 = "d688d25f4f533979df2fcd0881e1e30c2928e5b654ff09bf1440923282b0d945",
)

maven_import(
group_id = "io.grpc",
artifact_id = "grpc-core",
Expand Down

0 comments on commit a482a3a

Please sign in to comment.