diff --git a/WORKSPACE b/WORKSPACE index c8326353..fe34d70c 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -47,31 +47,12 @@ http_archive( urls = ["https://github.com/abseil/abseil-cpp/archive/4038192a57cb75f7ee671f81a3378ff4c74c4f8e.zip"], ) -# Using a protobuf javalite version that contains @com_google_protobuf_javalite//:javalite_toolchain -http_archive( - name = "com_google_protobuf_javalite", - strip_prefix = "protobuf-javalite", - urls = ["https://github.com/google/protobuf/archive/javalite.zip"], -) - http_archive( name = "com_google_protobuf", strip_prefix = "protobuf-3.21.12", urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.21.12.tar.gz"], ) -http_archive( - name = "com_google_protobuf_cc", - strip_prefix = "protobuf-3.21.12", - urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.21.12.tar.gz"], -) - -http_archive( - name = "com_google_protobuf_java", - strip_prefix = "protobuf-3.21.12", - urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.21.12.tar.gz"], -) - # Load common dependencies. load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") protobuf_deps() @@ -79,13 +60,6 @@ load("@rules_cc//cc:repositories.bzl", "rules_cc_dependencies", "rules_cc_toolch rules_cc_dependencies() rules_cc_toolchains() -http_archive( - name = "com_google_glog", - sha256 = "f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c", - strip_prefix = "glog-0.4.0", - urls = ["https://github.com/google/glog/archive/v0.4.0.tar.gz"], -) - http_archive( name = "com_google_ukey2", strip_prefix = "ukey2-master", @@ -131,22 +105,6 @@ http_archive( urls = ["https://github.com/google/googletest/archive/main.zip"], ) -http_archive( - name = "com_google_webrtc", - build_file_content = """ -package(default_visibility = ["//visibility:public"]) -""", - urls = ["https://webrtc.googlesource.com/src/+archive/main.tar.gz"], -) - -# gflags needed by glog -http_archive( - name = "com_github_gflags_gflags", - strip_prefix = "gflags-2.2.2", - sha256 = "19713a36c9f32b33df59d1c79b4958434cb005b5b47dc5400a7a4b078111d9b5", - url = "https://github.com/gflags/gflags/archive/v2.2.2.zip", -) - # ---------------------------------------------- # Nisaba: Script processing library from Google: # ---------------------------------------------- @@ -180,12 +138,3 @@ http_archive( urls = ["https://github.com/inazarenko/protobuf-matchers/archive/refs/heads/master.zip"], strip_prefix = "protobuf-matchers-master", ) - -http_archive( - name = "com_googlesource_code_re2", - sha256 = "26155e050b10b5969e986dab35654247a3b1b295e0532880b5a9c13c0a700ceb", - strip_prefix = "re2-2021-06-01", - urls = [ - "https://github.com/google/re2/archive/refs/tags/2021-06-01.tar.gz", - ], -) diff --git a/connections/implementation/proto/BUILD b/connections/implementation/proto/BUILD index be1bba96..cb91b1d9 100644 --- a/connections/implementation/proto/BUILD +++ b/connections/implementation/proto/BUILD @@ -13,6 +13,7 @@ # limitations under the License. load("@rules_cc//cc:defs.bzl", "cc_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_library") licenses(["notice"]) diff --git a/fastpair/proto/BUILD b/fastpair/proto/BUILD index 1ef59ebb..3a214a90 100644 --- a/fastpair/proto/BUILD +++ b/fastpair/proto/BUILD @@ -1,4 +1,5 @@ load("@rules_cc//cc:defs.bzl", "cc_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_library") licenses(["notice"]) diff --git a/internal/data/BUILD b/internal/data/BUILD index 2ff9e133..578e1e30 100644 --- a/internal/data/BUILD +++ b/internal/data/BUILD @@ -1,4 +1,5 @@ load("@rules_cc//cc:defs.bzl", "cc_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_library") licenses(["notice"]) diff --git a/internal/platform/BUILD b/internal/platform/BUILD index 2f151ab9..a978dc61 100644 --- a/internal/platform/BUILD +++ b/internal/platform/BUILD @@ -358,11 +358,11 @@ cc_library( "@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/functional:any_invocable", + "@com_google_absl//absl/log", "@com_google_absl//absl/log:check", "@com_google_absl//absl/strings", "@com_google_absl//absl/synchronization", "@com_google_absl//absl/time", - "@com_google_glog//:glog", ], ) diff --git a/internal/platform/implementation/g3/BUILD b/internal/platform/implementation/g3/BUILD index db01a738..9acd07c2 100644 --- a/internal/platform/implementation/g3/BUILD +++ b/internal/platform/implementation/g3/BUILD @@ -53,11 +53,11 @@ cc_library( "@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/container:btree", "@com_google_absl//absl/container:flat_hash_map", + "@com_google_absl//absl/log:log_streamer", "@com_google_absl//absl/strings", "@com_google_absl//absl/synchronization", "@com_google_absl//absl/time", "@com_google_absl//absl/types:span", - "@com_google_glog//:glog", "@com_google_nisaba//nisaba/port:thread_pool", "@nlohmann_json//:json", ], diff --git a/internal/platform/implementation/g3/log_message.h b/internal/platform/implementation/g3/log_message.h index 423db804..357a03d6 100644 --- a/internal/platform/implementation/g3/log_message.h +++ b/internal/platform/implementation/g3/log_message.h @@ -15,7 +15,7 @@ #ifndef PLATFORM_IMPL_G3_LOG_MESSAGE_H_ #define PLATFORM_IMPL_G3_LOG_MESSAGE_H_ -#include "glog/logging.h" +#include "absl/log/log_streamer.h" #include "internal/platform/implementation/log_message.h" namespace nearby { diff --git a/internal/platform/logging.h b/internal/platform/logging.h index 3bdc654a..f372a7eb 100644 --- a/internal/platform/logging.h +++ b/internal/platform/logging.h @@ -37,7 +37,10 @@ #define CHECK_GE(a, b) static_cast(0), a >= b ? (void) 0 : abort() #define DCHECK_GE(a, b) static_cast(0), a >= b ? (void) 0 : abort() #else -#include "glog/logging.h" +// IWYU pragma: begin_exports +#include "absl/log/check.h" +#include "absl/log/log.h" +// IWYU pragma: end_exports #endif #include "internal/platform/implementation/log_message.h" #include "internal/platform/implementation/platform.h" diff --git a/internal/proto/BUILD b/internal/proto/BUILD index 0cd7e234..9cd5efa0 100644 --- a/internal/proto/BUILD +++ b/internal/proto/BUILD @@ -1,4 +1,5 @@ load("@rules_cc//cc:defs.bzl", "cc_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_library") # NOTE: gRPC libraries not needed. proto_library( diff --git a/internal/proto/analytics/BUILD b/internal/proto/analytics/BUILD index fcd46ccb..58be6950 100644 --- a/internal/proto/analytics/BUILD +++ b/internal/proto/analytics/BUILD @@ -13,6 +13,7 @@ # limitations under the License. load("@rules_cc//cc:defs.bzl", "cc_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_library") licenses(["notice"]) diff --git a/presence/proto/BUILD b/presence/proto/BUILD index 390eeab4..e58b730c 100644 --- a/presence/proto/BUILD +++ b/presence/proto/BUILD @@ -1,4 +1,5 @@ load("@rules_cc//cc:defs.bzl", "cc_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_library") proto_library( name = "presence_frame_proto", diff --git a/proto/BUILD b/proto/BUILD index 937a3efd..51c67a93 100644 --- a/proto/BUILD +++ b/proto/BUILD @@ -17,6 +17,7 @@ # Placeholder: load py_proto_library load("@rules_cc//cc:defs.bzl", "cc_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_library") licenses(["notice"]) diff --git a/proto/errorcode/BUILD b/proto/errorcode/BUILD index 1ec24aef..581da014 100644 --- a/proto/errorcode/BUILD +++ b/proto/errorcode/BUILD @@ -15,6 +15,7 @@ # Proto for Nearby products load("@rules_cc//cc:defs.bzl", "cc_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_library") licenses(["notice"]) diff --git a/proto/mediums/BUILD b/proto/mediums/BUILD index 7457b04e..eb05f144 100644 --- a/proto/mediums/BUILD +++ b/proto/mediums/BUILD @@ -13,6 +13,7 @@ # limitations under the License. load("@rules_cc//cc:defs.bzl", "cc_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_library") licenses(["notice"]) diff --git a/sharing/proto/BUILD b/sharing/proto/BUILD index 7e1e40ef..f818054d 100644 --- a/sharing/proto/BUILD +++ b/sharing/proto/BUILD @@ -1,4 +1,5 @@ load("@rules_cc//cc:defs.bzl", "cc_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_library") licenses(["notice"]) diff --git a/sharing/proto/analytics/BUILD b/sharing/proto/analytics/BUILD index 05f5f6c1..8b52b62c 100644 --- a/sharing/proto/analytics/BUILD +++ b/sharing/proto/analytics/BUILD @@ -13,6 +13,7 @@ # limitations under the License. load("@rules_cc//cc:defs.bzl", "cc_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_library") licenses(["notice"])