Re-package grpc and protobuf with the right group id and version
Change-Id: Ib1a17d917a061d3cce32eed3e72b18c596ccff69
diff --git a/protocols/grpc/BUILD b/protocols/grpc/BUILD
index 3d46f95..f82e1f0 100644
--- a/protocols/grpc/BUILD
+++ b/protocols/grpc/BUILD
@@ -1,17 +1,19 @@
load("//tools/build/bazel:osgi_java_library.bzl", "wrapped_osgi_jar")
+load("//tools/build/bazel:variables.bzl", "GRPC_JAVA_VERSION")
+load("//tools/build/bazel:variables.bzl", "PROTOBUF_VERSION")
BUNDLES = [
"//protocols/grpc/proto:onos-protocols-grpc-proto",
"//protocols/grpc/api:onos-protocols-grpc-api",
"//protocols/grpc/ctl:onos-protocols-grpc-ctl",
# gRPC dependencies (with patched core)
- ":grpc-bundle-core",
- ":grpc-bundle-stub",
- ":grpc-bundle-netty",
- ":grpc-bundle-auth",
- ":grpc-bundle-protobuf",
- ":grpc-bundle-protobuf-lite",
- ":protobuf-java-bundle",
+ ":grpc-core",
+ ":grpc-stub",
+ ":grpc-netty",
+ ":grpc-auth",
+ ":grpc-protobuf",
+ ":grpc-protobuf-lite",
+ ":protobuf-java",
"@com_google_api_grpc_proto_google_common_protos//jar",
"@com_google_errorprone_error_prone_annotations//jar",
"@com_google_auth_google_auth_library_credentials//jar",
@@ -30,12 +32,16 @@
)
# Wrap protobuf and grpc-related JARs in OSGi-compatible ones, since the
-# original one are built with Bazel and NOT imported via mvn.
+# original ones are built with Bazel and NOT imported via mvn.
# FIXME: consider moving these rules somewhere else as other apps depend on it
# (e.g. openstacktelemetry and kafka-integration) but they don't directly
# depend on any onos-protocols-grpc-* module.
+GRPC_GROUP_ID = "io.grpc"
+
+PROTOBUF_GROUP_ID = "com.google.protobuf"
+
wrapped_osgi_jar(
# Differently from the official "grpc-core" package, here we also include
# "grpc-context" to solve the OSGI split-brain problem:
@@ -43,50 +49,64 @@
# We use patched Bazel BUILD files to package together core and context (see
# tools/build/bazel/grpc_workspace.bzl). If you need grpc-context as a
# compile-time dependency, please use this one.
- name = "grpc-bundle-core",
+ name = "grpc-core",
+ group = GRPC_GROUP_ID,
jar = "@io_grpc_grpc_java//core",
+ version = GRPC_JAVA_VERSION,
visibility = ["//visibility:public"],
deps = [],
)
wrapped_osgi_jar(
- name = "grpc-bundle-stub",
+ name = "grpc-stub",
+ group = GRPC_GROUP_ID,
jar = "@io_grpc_grpc_java//stub",
+ version = GRPC_JAVA_VERSION,
visibility = ["//visibility:public"],
deps = [],
)
wrapped_osgi_jar(
- name = "grpc-bundle-netty",
+ name = "grpc-netty",
+ group = GRPC_GROUP_ID,
jar = "@io_grpc_grpc_java//netty",
+ version = GRPC_JAVA_VERSION,
visibility = ["//visibility:public"],
deps = [],
)
wrapped_osgi_jar(
- name = "grpc-bundle-auth",
+ name = "grpc-auth",
+ group = GRPC_GROUP_ID,
jar = "@io_grpc_grpc_java//auth",
+ version = GRPC_JAVA_VERSION,
visibility = ["//visibility:public"],
deps = [],
)
wrapped_osgi_jar(
- name = "grpc-bundle-protobuf",
+ name = "grpc-protobuf",
+ group = GRPC_GROUP_ID,
jar = "@io_grpc_grpc_java//protobuf",
+ version = GRPC_JAVA_VERSION,
visibility = ["//visibility:public"],
deps = [],
)
wrapped_osgi_jar(
- name = "grpc-bundle-protobuf-lite",
+ name = "grpc-protobuf-lite",
+ group = GRPC_GROUP_ID,
jar = "@io_grpc_grpc_java//protobuf-lite",
+ version = GRPC_JAVA_VERSION,
visibility = ["//visibility:public"],
deps = [],
)
wrapped_osgi_jar(
- name = "protobuf-java-bundle",
+ name = "protobuf-java",
+ group = PROTOBUF_GROUP_ID,
jar = "@com_google_protobuf//:protobuf_java",
+ version = PROTOBUF_VERSION,
visibility = ["//visibility:public"],
deps = [],
)