Fix build of protobuf-related components to support Bazel 0.22
- Bumped version of protobuf to 3.6.1.3 (includes fix for Bazel 0.22)
- Removed all protobuf and grpc dependencies from deps.json. Instead,
depends solely on what's provided by the external grpc and protobuf
workspaces.
- Use OSGi-wrapped protobuf and grpc JARs built with Bazel for runtime
- Add missing netty-related bundles to onos-thirdparty-base (required
by grpc)
Note, build with Bazel 0.22 is still broken because of
osgi_java_library.bzl, unless the following build arg is used:
build --incompatible_string_is_not_iterable=false
It seems the error is caused by dead code in osgi_java_library.bzl
that should be removed.
Change-Id: I749f1de25902bf9df5242444380f7224bc99b4b5
diff --git a/tools/build/bazel/protobuf_workspace.bzl b/tools/build/bazel/protobuf_workspace.bzl
index 4a65eab..e850eb6 100644
--- a/tools/build/bazel/protobuf_workspace.bzl
+++ b/tools/build/bazel/protobuf_workspace.bzl
@@ -1,13 +1,13 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
-PROTOBUF_VER = "3.6.1"
-SHA = "0a4c6d0678eb2f063df332cff1a41647ef692c067b5cfb19e51bca778e79d9e0"
+PROTOBUF_VER = "3.6.1.3"
+SHA = "9510dd2afc29e7245e9e884336f848c8a6600a14ae726adb6befdb4f786f0be2"
def generate_protobuf():
http_archive(
name = "com_google_protobuf",
- urls = ["https://github.com/google/protobuf/releases/download/v%s/protobuf-all-%s.zip" %
- (PROTOBUF_VER, PROTOBUF_VER)],
+ urls = ["https://github.com/protocolbuffers/protobuf/archive/v%s.zip" %
+ PROTOBUF_VER],
sha256 = SHA,
strip_prefix = "protobuf-" + PROTOBUF_VER,
)