Convert googleapis and remoteapis into local_repository repos.
This is the third_party half of the change to fix #6601.
This half adds the needed BUILD files and WORKSPACE files for
@googleapis and @remoteapis.
The next commit will update the (non-third_party) code to use this.
This commit is very likely to break CI. Instead of rolling back, wait
for the next in the series which should unbreak everything.
diff --git a/third_party/googleapis/BUILD.bazel b/third_party/googleapis/BUILD.bazel
new file mode 100644
index 0000000..a672174
--- /dev/null
+++ b/third_party/googleapis/BUILD.bazel
@@ -0,0 +1,256 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+exports_files(["LICENSE"])
+
+load("@io_bazel//third_party/grpc:build_defs.bzl", "java_grpc_library")
+load("@io_bazel//tools/build_rules:utilities.bzl", "java_library_srcs")
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+ visibility = ["@//third_party:__pkg__"],
+)
+
+JAVA_LIBRARY_PROTOS = [
+ "google_api_auth",
+ "google_api_http",
+ "google_api_annotations",
+ "google_watch_v1",
+ "google_rpc_status",
+ "google_rpc_error_details",
+ "google_rpc_code",
+ "google_longrunning_operations",
+ "google_devtools_remoteexecution_v1test_remote_execution",
+ "google_devtools_build_v1_publish_build_event",
+ "google_bytestream_bytestream",
+ "google_devtools_build_v1_build_status",
+ "google_devtools_build_v1_build_events",
+]
+
+[java_library_srcs(
+ name = proto + "_java_proto_srcs",
+ deps = [":" + proto + "_java_proto"],
+) for proto in JAVA_LIBRARY_PROTOS]
+
+# for bootstrapping
+filegroup(
+ name = "dist_jars",
+ srcs = [":" + proto + "_java_proto_srcs" for proto in JAVA_LIBRARY_PROTOS] + [
+ ":google_devtools_build_v1_publish_build_event_java_grpc_srcs",
+ ":google_bytestream_bytestream_java_grpc_srcs",
+ ":google_devtools_remoteexecution_v1test_remote_execution_java_grpc_srcs",
+ ":google_watch_v1_java_grpc_srcs",
+ ],
+ visibility = ["@//src:__pkg__"],
+)
+
+java_proto_library(
+ name = "google_devtools_build_v1_build_status_java_proto",
+ deps = [":google_devtools_build_v1_build_status_proto"],
+)
+
+java_proto_library(
+ name = "google_devtools_build_v1_build_events_java_proto",
+ deps = [":google_devtools_build_v1_build_events_proto"],
+)
+
+java_grpc_library(
+ name = "google_devtools_build_v1_publish_build_event_java_grpc",
+ srcs = [":google_devtools_build_v1_publish_build_event_proto"],
+ deps = [":google_devtools_build_v1_publish_build_event_java_proto"],
+)
+
+java_proto_library(
+ name = "google_devtools_build_v1_publish_build_event_java_proto",
+ deps = [":google_devtools_build_v1_publish_build_event_proto"],
+)
+
+java_proto_library(
+ name = "google_bytestream_bytestream_java_proto",
+ deps = [":google_bytestream_bytestream_proto"],
+)
+
+java_proto_library(
+ name = "google_longrunning_operations_java_proto",
+ deps = [":google_longrunning_operations_proto"],
+)
+
+java_proto_library(
+ name = "google_watch_v1_java_proto",
+ deps = [":google_watch_v1_proto"],
+)
+
+java_proto_library(
+ name = "google_rpc_status_java_proto",
+ deps = [":google_rpc_status_proto"],
+)
+
+java_proto_library(
+ name = "google_rpc_error_details_java_proto",
+ deps = [":google_rpc_error_details_proto"],
+)
+
+java_proto_library(
+ name = "google_rpc_code_java_proto",
+ deps = [":google_rpc_code_proto"],
+)
+
+java_proto_library(
+ name = "google_devtools_remoteexecution_v1test_remote_execution_java_proto",
+ deps = [":google_devtools_remoteexecution_v1test_remote_execution_proto"],
+)
+
+java_proto_library(
+ name = "google_api_annotations_java_proto",
+ deps = [":google_api_annotations_proto"],
+)
+
+java_proto_library(
+ name = "google_api_http_java_proto",
+ deps = [":google_api_http_proto"],
+)
+
+java_proto_library(
+ name = "google_api_auth_java_proto",
+ deps = [":google_api_auth_proto"],
+)
+
+java_grpc_library(
+ name = "google_bytestream_bytestream_java_grpc",
+ srcs = [":google_bytestream_bytestream_proto"],
+ deps = [":google_bytestream_bytestream_java_proto"],
+)
+
+java_grpc_library(
+ name = "google_watch_v1_java_grpc",
+ srcs = [":google_watch_v1_proto"],
+ deps = [":google_watch_v1_java_proto"],
+)
+
+java_grpc_library(
+ name = "google_devtools_remoteexecution_v1test_remote_execution_java_grpc",
+ srcs = [":google_devtools_remoteexecution_v1test_remote_execution_proto"],
+ deps = [
+ ":google_devtools_remoteexecution_v1test_remote_execution_java_proto",
+ ":google_longrunning_operations_java_proto",
+ ],
+)
+
+proto_library(
+ name = "google_devtools_remoteexecution_v1test_remote_execution_proto",
+ srcs = ["google/devtools/remoteexecution/v1test/remote_execution.proto"],
+ deps = [
+ ":google_api_annotations_proto",
+ ":google_longrunning_operations_proto",
+ ":google_rpc_status_proto",
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:duration_proto",
+ ],
+)
+
+proto_library(
+ name = "google_rpc_code_proto",
+ srcs = ["google/rpc/code.proto"],
+)
+
+proto_library(
+ name = "google_rpc_error_details_proto",
+ srcs = ["google/rpc/error_details.proto"],
+ deps = [
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:duration_proto",
+ ],
+)
+
+proto_library(
+ name = "google_watch_v1_proto",
+ srcs = ["google/watcher/v1/watch.proto"],
+ deps = [
+ ":google_api_annotations_proto",
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:empty_proto",
+ ],
+)
+
+proto_library(
+ name = "google_bytestream_bytestream_proto",
+ srcs = ["google/bytestream/bytestream.proto"],
+ deps = [
+ ":google_api_annotations_proto",
+ ],
+)
+
+proto_library(
+ name = "google_longrunning_operations_proto",
+ srcs = ["google/longrunning/operations.proto"],
+ deps = [
+ ":google_api_annotations_proto",
+ ":google_api_http_proto",
+ ":google_rpc_status_proto",
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:empty_proto",
+ ],
+)
+
+proto_library(
+ name = "google_devtools_build_v1_build_status_proto",
+ srcs = ["google/devtools/build/v1/build_status.proto"],
+ deps = [
+ ":google_api_annotations_proto",
+ "@com_google_protobuf//:any_proto",
+ ],
+)
+
+proto_library(
+ name = "google_devtools_build_v1_build_events_proto",
+ srcs = ["google/devtools/build/v1/build_events.proto"],
+ deps = [
+ ":google_api_annotations_proto",
+ ":google_devtools_build_v1_build_status_proto",
+ ":google_rpc_status_proto",
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ "@com_google_protobuf//:wrappers_proto",
+ ],
+)
+
+proto_library(
+ name = "google_devtools_build_v1_publish_build_event_proto",
+ srcs = ["google/devtools/build/v1/publish_build_event.proto"],
+ deps = [
+ ":google_api_annotations_proto",
+ ":google_api_auth_proto",
+ ":google_devtools_build_v1_build_events_proto",
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ ],
+)
+
+proto_library(
+ name = "google_api_annotations_proto",
+ srcs = ["google/api/annotations.proto"],
+ deps = [
+ ":google_api_http_proto",
+ "@com_google_protobuf//:descriptor_proto",
+ ],
+)
+
+proto_library(
+ name = "google_api_http_proto",
+ srcs = ["google/api/http.proto"],
+)
+
+proto_library(
+ name = "google_rpc_status_proto",
+ srcs = ["google/rpc/status.proto"],
+ deps = ["@com_google_protobuf//:any_proto"],
+)
+
+proto_library(
+ name = "google_api_auth_proto",
+ srcs = ["google/api/auth.proto"],
+ deps = [":google_api_annotations_proto"],
+)