Bazel bzlmod support for grpc-web.

Updates the bazel-based build of grpc-web to use bzlmod.

The WORKSPACE file is retained for now, but it should probably be deleted since
it should be unused.
This commit is contained in:
Red Daly 2024-08-04 15:09:10 -07:00
parent 8ba8fbeb5f
commit e0e45f0277
4 changed files with 9223 additions and 0 deletions

View File

@ -1 +1,14 @@
build --copt=-Wno-error=deprecated-declarations --host_copt=-Wno-error=deprecated-declarations
# Required until this is the default; expected in Bazel 7
common --enable_bzlmod
# Load any settings specific to the current user.
# .bazelrc.user should appear in .gitignore so that settings are not shared with team members
# This needs to be last statement in this
# config, as the user configuration should be able to overwrite flags from this file.
# See https://docs.bazel.build/versions/master/best-practices.html#bazelrc
# (Note that we use .bazelrc.user so the file appears next to .bazelrc in directory listing,
# rather than user.bazelrc as suggested in the Bazel docs)
try-import %workspace%/.bazelrc.user

17
MODULE.bazel Normal file
View File

@ -0,0 +1,17 @@
module(
name = "grpc_web",
version = "1.5.0",
compatibility_level = 1,
repo_name = "com_github_grpc_grpc_web",
)
bazel_dep(name = "protobuf", version = "23.1", repo_name = "com_google_protobuf")
bazel_dep(name = "grpc", version = "1.65.0", repo_name = "com_github_grpc_grpc")
bazel_dep(name = "rules_cc", version = "0.0.2")
bazel_dep(name = "rules_proto", version = "6.0.2")
# Needed to resolve https://github.com/bazelbuild/bazel-central-registry/issues/2538.
single_version_override(
module_name = "grpc-java",
version = "1.64.0",
)

9191
MODULE.bazel.lock Normal file

File diff suppressed because it is too large Load Diff

2
WORKSPACE.bzlmod Normal file
View File

@ -0,0 +1,2 @@
# Empty workspace file so that MODULE.bazel is used instead of the WORKSPACE system.
# See https://bazel.build/external/migration#workspace.bzlmod