googletest/googletest_deps.bzl
Derek Mauro cee1ba1f24 Change the Bazel build to use the canonical repo names used by Bzlmod
and the Bazel Central Registry

GoogleTest and its dependencies now use the following names:
GoogleTest: com_google_googletest -> googletest
Abseil: com_google_absl -> abseil-cpp
RE2: com_googlesource_code_re2 -> re2

Bazel users using the WORKSPACE file to specify dependencies may
need to use https://bazel.build/rules/lib/repo/http#http_archive-repo_mapping
to remap repositories to their former names if their dependencies do not
agree on on which name is used.

It is recommended that users migrate to bzlmod to manage Bazel dependencies.

PiperOrigin-RevId: 654430227
Change-Id: Iae8797994d7d87bd4f013dcdc889e7494a6ad2fb
2024-07-20 23:09:44 -07:00

29 lines
1.1 KiB
Python

"""Load dependencies needed to use the googletest library as a 3rd-party consumer."""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//:fake_fuchsia_sdk.bzl", "fake_fuchsia_sdk")
def googletest_deps():
"""Loads common dependencies needed to use the googletest library."""
if not native.existing_rule("re2"):
http_archive(
name = "re2",
sha256 = "eb2df807c781601c14a260a507a5bb4509be1ee626024cb45acbd57cb9d4032b",
strip_prefix = "re2-2024-07-02",
urls = ["https://github.com/google/re2/releases/download/2024-07-02/re2-2024-07-02.tar.gz"],
)
if not native.existing_rule("abseil-cpp"):
http_archive(
name = "abseil-cpp",
sha256 = "733726b8c3a6d39a4120d7e45ea8b41a434cdacde401cba500f14236c49b39dc",
strip_prefix = "abseil-cpp-20240116.2",
urls = ["https://github.com/abseil/abseil-cpp/releases/download/20240116.2/abseil-cpp-20240116.2.tar.gz"],
)
if not native.existing_rule("fuchsia_sdk"):
fake_fuchsia_sdk(
name = "fuchsia_sdk",
)