Carmelo Cascone | 4164436 | 2018-08-09 16:56:43 -0700 | [diff] [blame] | 1 | load("//tools/build/bazel:osgi_java_library.bzl", "wrapped_osgi_jar") |
| 2 | load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library") |
| 3 | |
| 4 | wrapped_osgi_jar( |
| 5 | name = "gnmi_java_grpc", |
| 6 | jar = ":gnmi_java_grpc_native", |
Carmelo Cascone | 4164436 | 2018-08-09 16:56:43 -0700 | [diff] [blame] | 7 | visibility = ["//visibility:public"], |
Ray Milkey | 05d609a | 2018-08-15 10:27:58 -0700 | [diff] [blame] | 8 | deps = [ |
| 9 | "@io_grpc_grpc_java//core", |
| 10 | "@io_grpc_grpc_java//protobuf", |
| 11 | "@io_grpc_grpc_java//stub", |
| 12 | ], |
Carmelo Cascone | 4164436 | 2018-08-09 16:56:43 -0700 | [diff] [blame] | 13 | ) |
| 14 | |
| 15 | wrapped_osgi_jar( |
| 16 | name = "gnmi_java_proto", |
| 17 | jar = ":gnmi_java_proto_native", |
Ray Milkey | 05d609a | 2018-08-15 10:27:58 -0700 | [diff] [blame] | 18 | visibility = ["//visibility:public"], |
Carmelo Cascone | 4164436 | 2018-08-09 16:56:43 -0700 | [diff] [blame] | 19 | deps = [ |
| 20 | "@com_google_protobuf//:protobuf_java", |
| 21 | ], |
Carmelo Cascone | 4164436 | 2018-08-09 16:56:43 -0700 | [diff] [blame] | 22 | ) |
| 23 | |
| 24 | java_proto_library( |
| 25 | name = "gnmi_java_proto_native", |
Carmelo Cascone | 4164436 | 2018-08-09 16:56:43 -0700 | [diff] [blame] | 26 | visibility = ["//visibility:public"], |
Ray Milkey | 05d609a | 2018-08-15 10:27:58 -0700 | [diff] [blame] | 27 | deps = [":gnmi_proto"], |
Carmelo Cascone | 4164436 | 2018-08-09 16:56:43 -0700 | [diff] [blame] | 28 | ) |
| 29 | |
| 30 | java_grpc_library( |
| 31 | name = "gnmi_java_grpc_native", |
| 32 | srcs = [":gnmi_proto"], |
| 33 | deps = [":gnmi_java_proto_native"], |
| 34 | ) |
| 35 | |
| 36 | proto_library( |
| 37 | name = "gnmi_proto", |
| 38 | srcs = ["src/main/proto/gnmi.proto"], |
| 39 | deps = [ |
| 40 | "@com_google_protobuf//:any_proto", |
| 41 | "@com_google_protobuf//:descriptor_proto", |
Ray Milkey | 05d609a | 2018-08-15 10:27:58 -0700 | [diff] [blame] | 42 | ], |
Carmelo Cascone | 4164436 | 2018-08-09 16:56:43 -0700 | [diff] [blame] | 43 | ) |