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/BUILD b/third_party/BUILD
index 6afb3a6..a3b2338 100644
--- a/third_party/BUILD
+++ b/third_party/BUILD
@@ -32,10 +32,10 @@
"//third_party/py/six:srcs",
"//third_party/zlib:srcs",
"//third_party/nanopb:srcs",
- "//third_party/googleapis:srcs",
"//third_party/def_parser:srcs",
"//third_party/pprof:srcs",
- "//third_party/remoteapis:srcs",
+ "@googleapis//:srcs",
+ "@remoteapis//:srcs",
],
)
diff --git a/third_party/googleapis/BUILD b/third_party/googleapis/BUILD.bazel
similarity index 88%
rename from third_party/googleapis/BUILD
rename to third_party/googleapis/BUILD.bazel
index ecb2c04..a672174 100644
--- a/third_party/googleapis/BUILD
+++ b/third_party/googleapis/BUILD.bazel
@@ -10,23 +10,23 @@
filegroup(
name = "srcs",
srcs = glob(["**"]),
- visibility = ["//third_party:__pkg__"],
+ 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",
+ "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(
@@ -37,12 +37,11 @@
# 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",
+ 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__"],
)
diff --git a/third_party/googleapis/WORKSPACE b/third_party/googleapis/WORKSPACE
new file mode 100644
index 0000000..146cbd3
--- /dev/null
+++ b/third_party/googleapis/WORKSPACE
@@ -0,0 +1 @@
+workspace(name = "googleapis")
diff --git a/third_party/remoteapis/BUILD.bazel b/third_party/remoteapis/BUILD.bazel
index 022500a1..c4d2225 100644
--- a/third_party/remoteapis/BUILD.bazel
+++ b/third_party/remoteapis/BUILD.bazel
@@ -10,7 +10,7 @@
filegroup(
name = "srcs",
srcs = glob(["**"]),
- visibility = ["//third_party:__pkg__"],
+ visibility = ["@//third_party:__pkg__"],
)
JAVA_LIBRARY_PROTOS = [
diff --git a/third_party/remoteapis/WORKSPACE b/third_party/remoteapis/WORKSPACE
new file mode 100644
index 0000000..fb3967a
--- /dev/null
+++ b/third_party/remoteapis/WORKSPACE
@@ -0,0 +1 @@
+workspace(name = "remoteapis")