Fix p4runtime runtime dependencies when building with Bazel

A convenient macro for packaging together all proto and gRPC libraries
in an OSGi jar is provided. Also re-packaging of gRPC core (to avoid OSGi
split problem) is simplified by depending on a patched fork of grpc-java.

Change-Id: Idb79a5bea8ae0bc57b146bda1fc47a4568d12c60
diff --git a/protocols/grpc/proto/BUILD b/protocols/grpc/proto/BUILD
index bebc0ef..fb4c33c 100644
--- a/protocols/grpc/proto/BUILD
+++ b/protocols/grpc/proto/BUILD
@@ -1,36 +1,8 @@
-load("//tools/build/bazel:osgi_java_library.bzl", "wrapped_osgi_jar")
-load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
+load("//tools/build/bazel:osgi_java_library.bzl", "osgi_proto_jar")
 
-wrapped_osgi_jar(
-    name = "dummy_java_grpc",
-    jar = ":dummy_java_grpc_native",
-    deps = [
-        "@io_grpc_grpc_java//stub",
-        "@io_grpc_grpc_java//core",
-        "@io_grpc_grpc_java//protobuf"
-    ],
-    visibility = ["//visibility:public"],
-)
-
-wrapped_osgi_jar(
-    name = "dummy_java_proto",
-    jar = ":dummy_java_proto_native",
-    deps = [
-        "@com_google_protobuf//:protobuf_java",
-    ],
-    visibility = ["//visibility:public"],
-)
-
-java_proto_library(
-    name = "dummy_java_proto_native",
-    deps = [":dummy_proto"],
-    visibility = ["//visibility:public"],
-)
-
-java_grpc_library(
-    name = "dummy_java_grpc_native",
-    srcs = [":dummy_proto"],
-    deps = [":dummy_java_proto_native"],
+osgi_proto_jar(
+    proto_libs = [":dummy_proto"],
+    grpc_proto_lib = ":dummy_proto",
 )
 
 proto_library(