diff --git a/MODULE.bazel b/MODULE.bazel index cb631b8..f3119b6 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -9,3 +9,4 @@ bazel_dep(name = "bazel_skylib", version = "1.3.0") # Dependencies needed in tests bazel_dep(name = "rules_cc", version = "0.0.1", dev_dependency = True) bazel_dep(name = "googletest", version = "1.11.0", dev_dependency = True, repo_name = "com_google_googletest") +bazel_dep(name = "protobuf", version = "21.7", dev_dependency = True, repo_name = "com_google_protobuf") \ No newline at end of file diff --git a/WORKSPACE b/WORKSPACE index 8563f11..709c8c3 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -6,13 +6,17 @@ rules_proto_dependencies() rules_proto_toolchains() + # Dev-only dependencies. USERS SHOULD NOT INSTALL THESE! load(":dev_deps.bzl", "rules_proto_dev_deps") - rules_proto_dev_deps() -load("@bazelci_rules//:rbe_repo.bzl", "rbe_preconfig") +load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") +protobuf_deps() + + +load("@bazelci_rules//:rbe_repo.bzl", "rbe_preconfig") rbe_preconfig( name = "buildkite_config", toolchain = "ubuntu1804-bazel-java11", diff --git a/dev_deps.bzl b/dev_deps.bzl index 75f7d9b..8924465 100644 --- a/dev_deps.bzl +++ b/dev_deps.bzl @@ -2,9 +2,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + def rules_proto_dev_deps(): http_archive( - name = "rules_cc", + name = "rules_cc", sha256 = "4aeb102efbcfad509857d7cb9c5456731e8ce566bfbf2960286a2ec236796cc3", strip_prefix = "rules_cc-2f8c04c04462ab83c545ab14c0da68c3b4c96191", urls = [ @@ -31,3 +32,13 @@ def rules_proto_dev_deps(): "https://github.com/bazelbuild/continuous-integration/releases/download/rules-1.0.0/bazelci_rules-1.0.0.tar.gz", ], ) + + http_archive( + name = "com_google_protobuf", + sha256 = "75be42bd736f4df6d702a0e4e4d30de9ee40eac024c4b845d17ae4cc831fe4ae", + strip_prefix = "protobuf-21.7", + urls = [ + "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v21.7.tar.gz", + "https://github.com/protocolbuffers/protobuf/archive/v21.7.tar.gz", + ], + ) \ No newline at end of file