Re-package grpc and protobuf with the right group id and version
Change-Id: Ib1a17d917a061d3cce32eed3e72b18c596ccff69
diff --git a/tools/build/bazel/grpc_workspace.bzl b/tools/build/bazel/grpc_workspace.bzl
index bb71557..93703b8 100644
--- a/tools/build/bazel/grpc_workspace.bzl
+++ b/tools/build/bazel/grpc_workspace.bzl
@@ -1,4 +1,5 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+load("//tools/build/bazel:variables.bzl", "GRPC_JAVA_VERSION")
GRPC_VER = "1.18.0"
GRPC_SHA = "979cd1873c0f3aefa25f3d20336c023ce34471203bf2d954ad9e3158fc55c16b"
@@ -10,9 +11,9 @@
# grpc-java fork that fixes the OSGi split problem.
http_archive(
name = "io_grpc_grpc_java",
- urls = ["https://github.com/opennetworkinglab/grpc-java/archive/v%s-patched.zip" % GRPC_VER],
+ urls = ["https://github.com/opennetworkinglab/grpc-java/archive/v%s-patched.zip" % GRPC_JAVA_VERSION],
sha256 = GRPC_SHA,
- strip_prefix = "grpc-java-%s-patched" % GRPC_VER,
+ strip_prefix = "grpc-java-%s-patched" % GRPC_JAVA_VERSION,
)
# Google APIs protos (status.proto, etc.)
diff --git a/tools/build/bazel/protobuf_workspace.bzl b/tools/build/bazel/protobuf_workspace.bzl
index e850eb6..bf7e62b 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")
+load("//tools/build/bazel:variables.bzl", "PROTOBUF_VERSION")
-PROTOBUF_VER = "3.6.1.3"
SHA = "9510dd2afc29e7245e9e884336f848c8a6600a14ae726adb6befdb4f786f0be2"
def generate_protobuf():
http_archive(
name = "com_google_protobuf",
urls = ["https://github.com/protocolbuffers/protobuf/archive/v%s.zip" %
- PROTOBUF_VER],
+ PROTOBUF_VERSION],
sha256 = SHA,
- strip_prefix = "protobuf-" + PROTOBUF_VER,
+ strip_prefix = "protobuf-" + PROTOBUF_VERSION,
)
diff --git a/tools/build/bazel/variables.bzl b/tools/build/bazel/variables.bzl
index 943c1d0..90a7479 100644
--- a/tools/build/bazel/variables.bzl
+++ b/tools/build/bazel/variables.bzl
@@ -4,3 +4,6 @@
ONOS_ORIGIN = "ONOS Community"
APP_PREFIX = ONOS_GROUP_ID + "."
DEFAULT_APP_CATEGORY = "Utility"
+
+GRPC_JAVA_VERSION = "1.18.0"
+PROTOBUF_VERSION = "3.6.1.3"