Update gNMI version and build script
Change-Id: I0f2d3c84a7a13111dc5da966b21836338d327929
diff --git a/protocols/gnmi/stub/BUILD b/protocols/gnmi/stub/BUILD
index 3b1a2dc..cf79265 100644
--- a/protocols/gnmi/stub/BUILD
+++ b/protocols/gnmi/stub/BUILD
@@ -1,43 +1,14 @@
-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 = "gnmi_java_grpc",
- jar = ":gnmi_java_grpc_native",
- visibility = ["//visibility:public"],
+PROTOS = [
+ "@com_github_openconfig_gnmi//:gnmi_proto",
+ "@com_github_openconfig_gnmi//:gnmi_ext_proto",
+]
+
+osgi_proto_jar(
+ grpc_proto_lib = "@com_github_openconfig_gnmi//:gnmi_proto",
+ proto_libs = PROTOS,
deps = [
- "@io_grpc_grpc_java//core",
- "@io_grpc_grpc_java//protobuf",
- "@io_grpc_grpc_java//stub",
- ],
-)
-
-wrapped_osgi_jar(
- name = "gnmi_java_proto",
- jar = ":gnmi_java_proto_native",
- visibility = ["//visibility:public"],
- deps = [
- "@com_google_protobuf//:protobuf_java",
- ],
-)
-
-java_proto_library(
- name = "gnmi_java_proto_native",
- visibility = ["//visibility:public"],
- deps = [":gnmi_proto"],
-)
-
-java_grpc_library(
- name = "gnmi_java_grpc_native",
- srcs = [":gnmi_proto"],
- deps = [":gnmi_java_proto_native"],
-)
-
-proto_library(
- name = "gnmi_proto",
- srcs = ["src/main/proto/gnmi.proto"],
- deps = [
- "@com_google_protobuf//:any_proto",
- "@com_google_protobuf//:descriptor_proto",
+ "@com_google_api_grpc_proto_google_common_protos//jar",
],
)