Skip to content

Commit

Permalink
return com_google_protobuf_javalite archive and use it in MODULE.bazel
Browse files Browse the repository at this point in the history
  • Loading branch information
firov committed May 7, 2024
1 parent ae0e1de commit a058608
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ use_repo(
non_module_deps,
"com_github_cncf_xds",
"envoy_api",
"com_google_protobuf_javalite",
"io_grpc_grpc_proto",
)

Expand Down
13 changes: 12 additions & 1 deletion repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ IO_GRPC_GRPC_JAVA_ARTIFACTS = [
IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS = {
"com.google.protobuf:protobuf-java": "@com_google_protobuf//:protobuf_java",
"com.google.protobuf:protobuf-java-util": "@com_google_protobuf//:protobuf_java_util",
"com.google.protobuf:protobuf-javalite": "@com_google_protobuf//:protobuf_javalite",
"com.google.protobuf:protobuf-javalite": "@com_google_protobuf_javalite//:protobuf_javalite",
"io.grpc:grpc-alts": "@io_grpc_grpc_java//alts",
"io.grpc:grpc-api": "@io_grpc_grpc_java//api",
"io.grpc:grpc-auth": "@io_grpc_grpc_java//auth",
Expand Down Expand Up @@ -117,6 +117,8 @@ def grpc_java_repositories(bzlmod = False):
)
if not bzlmod and not native.existing_rule("com_google_protobuf"):
com_google_protobuf()
if not native.existing_rule("com_google_protobuf_javalite"):
com_google_protobuf_javalite()
if not bzlmod and not native.existing_rule("com_google_googleapis"):
http_archive(
name = "com_google_googleapis",
Expand Down Expand Up @@ -159,6 +161,15 @@ def com_google_protobuf():
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protobuf-25.1.tar.gz"],
)

def com_google_protobuf_javalite():
# java_lite_proto_library rules implicitly depend on @com_google_protobuf_javalite
http_archive(
name = "com_google_protobuf_javalite",
sha256 = "9bd87b8280ef720d3240514f884e56a712f2218f0d693b48050c836028940a42",
strip_prefix = "protobuf-25.1",
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protobuf-25.1.tar.gz"],
)

def io_grpc_grpc_proto():
http_archive(
name = "io_grpc_grpc_proto",
Expand Down

0 comments on commit a058608

Please sign in to comment.