Adding runtime dependencies for protobuf & gRPC.

Change-Id: Id6e8eede254252a9af1776579fa9bc9209385644
diff --git a/lib/BUCK b/lib/BUCK
index 014ac38..d93c8de 100644
--- a/lib/BUCK
+++ b/lib/BUCK
@@ -1,4 +1,4 @@
-# ***** This file was auto-generated at Thu, 9 Aug 2018 18:35:50 GMT. Do not edit this file manually. *****
+# ***** This file was auto-generated at Thu, 9 Aug 2018 23:15:05 GMT. Do not edit this file manually. *****
 # ***** Use onos-lib-gen *****
 
 pass_thru_pom(
@@ -1733,6 +1733,69 @@
 )
 
 remote_jar (
+  name = 'runtime-grpc-core',
+  out = 'grpc-core-1.14.0.jar',
+  url = 'mvn:io.grpc:grpc-core:jar:1.14.0',
+  sha1 = '526e5be291c96e248789d769c108a084febda07f',
+  maven_coords = 'io.grpc:grpc-core:jar:NON-OSGI:1.14.0',
+  visibility = [ 'PUBLIC' ],
+)
+
+remote_jar (
+  name = 'runtime-grpc-stub',
+  out = 'grpc-stub-1.14.0.jar',
+  url = 'mvn:io.grpc:grpc-stub:jar:1.14.0',
+  sha1 = '74bfe83c0dc69bf903fff8df3568cbeb8b387d35',
+  maven_coords = 'io.grpc:grpc-stub:jar:NON-OSGI:1.14.0',
+  visibility = [ 'PUBLIC' ],
+)
+
+remote_jar (
+  name = 'runtime-grpc-netty',
+  out = 'grpc-netty-1.14.0.jar',
+  url = 'mvn:io.grpc:grpc-netty:jar:1.14.0',
+  sha1 = '21c6edadd45b6869384f8aa0df1663d62c503617',
+  maven_coords = 'io.grpc:grpc-netty:jar:NON-OSGI:1.14.0',
+  visibility = [ 'PUBLIC' ],
+)
+
+remote_jar (
+  name = 'runtime-grpc-auth',
+  out = 'grpc-auth-1.14.0.jar',
+  url = 'mvn:io.grpc:grpc-auth:jar:1.14.0',
+  sha1 = '3b88d51b52da96d574f4dfd50ad6d2bc8904a858',
+  maven_coords = 'io.grpc:grpc-auth:jar:NON-OSGI:1.14.0',
+  visibility = [ 'PUBLIC' ],
+)
+
+remote_jar (
+  name = 'runtime-grpc-protobuf',
+  out = 'grpc-protobuf-1.14.0.jar',
+  url = 'mvn:io.grpc:grpc-protobuf:jar:1.14.0',
+  sha1 = 'd429fdc2e0d288b34ea7588bb762eb458f385bd5',
+  maven_coords = 'io.grpc:grpc-protobuf:jar:NON-OSGI:1.14.0',
+  visibility = [ 'PUBLIC' ],
+)
+
+remote_jar (
+  name = 'runtime-grpc-protobuf-lite',
+  out = 'grpc-protobuf-lite-1.14.0.jar',
+  url = 'mvn:io.grpc:grpc-protobuf-lite:jar:1.14.0',
+  sha1 = '2ac8c28ca927f954eaa228a931d9c163cf3d860f',
+  maven_coords = 'io.grpc:grpc-protobuf-lite:jar:NON-OSGI:1.14.0',
+  visibility = [ 'PUBLIC' ],
+)
+
+remote_jar (
+  name = 'runtime-protobuf',
+  out = 'protobuf-java-3.6.1.jar',
+  url = 'mvn:com.google.protobuf:protobuf-java:jar:3.6.1',
+  sha1 = '0d06d46ecfd92ec6d0f3b423b4cd81cb38d8b924',
+  maven_coords = 'com.google.protobuf:protobuf-java:3.6.1',
+  visibility = [ 'PUBLIC' ],
+)
+
+remote_jar (
   name = 'grpc-core-1.3.1',
   out = 'grpc-core-1.3.1.jar',
   url = 'mvn:io.grpc:grpc-core:jar:1.3.1',
diff --git a/lib/deps.json b/lib/deps.json
index 625869f..81ca104 100644
--- a/lib/deps.json
+++ b/lib/deps.json
@@ -275,8 +275,7 @@
     "org.apache.felix.scr.bnd": {
       "uri": "mvn:org.onosproject:org.apache.felix.scr.bnd:1.4.1-SNAPSHOT",
       "repo": "https://oss.sonatype.org/content/repositories/snapshots"
-    },
-    "snmp-core": "mvn:org.onosproject:snmp-core:1.3-20161021.1",
+    },"snmp-core": "mvn:org.onosproject:snmp-core:1.3-20161021.1",
     "mibs-net-snmp": "mvn:org.onosproject:mibbler-mibs-net-snmp:1.0-20151221.1",
     "mibs-rfc": "mvn:org.onosproject:mibbler-mibs-rfc:1.0-20151221.1",
     "io.socket-client": "mvn:io.socket:socket.io-client:jar:0.8.3",
@@ -316,6 +315,15 @@
     "gnu-idn": "mvn:org.gnu.inet:libidn:1.15",
     "sigar":"mvn:org.knowhowlab.osgi:sigar:1.6.5_01",
 
+    // Included merely for packaging purposes into run-time.
+    "runtime-grpc-core":"mvn:io.grpc:grpc-core:1.14.0",
+    "runtime-grpc-stub":"mvn:io.grpc:grpc-stub:1.14.0",
+    "runtime-grpc-netty":"mvn:io.grpc:grpc-netty:1.14.0",
+    "runtime-grpc-auth":"mvn:io.grpc:grpc-auth:1.14.0",
+    "runtime-grpc-protobuf":"mvn:io.grpc:grpc-protobuf:1.14.0",
+    "runtime-grpc-protobuf-lite":"mvn:io.grpc:grpc-protobuf-lite:1.14.0",
+    "runtime-protobuf":"mvn:com.google.protobuf:protobuf-java:3.6.1",
+
     // FIXME: Remove this for Bazel build...
     "grpc-core-1.3.1": "mvn:io.grpc:grpc-core:1.3.1",
     "grpc-protobuf-1.3.1": "mvn:io.grpc:grpc-protobuf:1.3.1",
diff --git a/protocols/grpc/BUILD b/protocols/grpc/BUILD
index 53c351f..e568960 100644
--- a/protocols/grpc/BUILD
+++ b/protocols/grpc/BUILD
@@ -5,13 +5,13 @@
     "//protocols/grpc/api:onos-protocols-grpc-api",
     "//protocols/grpc/ctl:onos-protocols-grpc-ctl",
     # gRPC dependencies
-    "@io_grpc_grpc_java//core",
-    "@io_grpc_grpc_java//stub",
-    "@io_grpc_grpc_java//netty",
-    "@io_grpc_grpc_java//auth",
-    "@io_grpc_grpc_java//protobuf",
-    "@io_grpc_grpc_java//protobuf-lite",
-    "@com_google_protobuf//:protobuf_java",
+    "@runtime_grpc_core//jar",
+    "@runtime_grpc_stub//jar",
+    "@runtime_grpc_netty//jar",
+    "@runtime_grpc_auth//jar",
+    "@runtime_grpc_protobuf//jar",
+    "@runtime_grpc_protobuf_lite//jar",
+    "@runtime_protobuf//jar",
     # Lazily adding all netty-related packages.
     # Some of them might not be necessary.
     "@io_netty_netty//jar",
diff --git a/tools/build/bazel/generate_workspace.bzl b/tools/build/bazel/generate_workspace.bzl
index 5dcbe45..d96a4fe 100644
--- a/tools/build/bazel/generate_workspace.bzl
+++ b/tools/build/bazel/generate_workspace.bzl
@@ -1,4 +1,4 @@
-# ***** This file was auto-generated at Thu, 9 Aug 2018 18:35:45 GMT. Do not edit this file manually. *****
+# ***** This file was auto-generated at Thu, 9 Aug 2018 23:14:57 GMT. Do not edit this file manually. *****
 # ***** Use onos-lib-gen *****
 
 load("//tools/build/bazel:variables.bzl", "ONOS_GROUP_ID", "ONOS_VERSION")
@@ -1148,6 +1148,48 @@
     )
 
     native.maven_jar(
+        name = "runtime_grpc_core",
+        artifact = "io.grpc:grpc-core:1.14.0",
+        sha1 = "526e5be291c96e248789d769c108a084febda07f",
+    )
+
+    native.maven_jar(
+        name = "runtime_grpc_stub",
+        artifact = "io.grpc:grpc-stub:1.14.0",
+        sha1 = "74bfe83c0dc69bf903fff8df3568cbeb8b387d35",
+    )
+
+    native.maven_jar(
+        name = "runtime_grpc_netty",
+        artifact = "io.grpc:grpc-netty:1.14.0",
+        sha1 = "21c6edadd45b6869384f8aa0df1663d62c503617",
+    )
+
+    native.maven_jar(
+        name = "runtime_grpc_auth",
+        artifact = "io.grpc:grpc-auth:1.14.0",
+        sha1 = "3b88d51b52da96d574f4dfd50ad6d2bc8904a858",
+    )
+
+    native.maven_jar(
+        name = "runtime_grpc_protobuf",
+        artifact = "io.grpc:grpc-protobuf:1.14.0",
+        sha1 = "d429fdc2e0d288b34ea7588bb762eb458f385bd5",
+    )
+
+    native.maven_jar(
+        name = "runtime_grpc_protobuf_lite",
+        artifact = "io.grpc:grpc-protobuf-lite:1.14.0",
+        sha1 = "2ac8c28ca927f954eaa228a931d9c163cf3d860f",
+    )
+
+    native.maven_jar(
+        name = "runtime_protobuf",
+        artifact = "com.google.protobuf:protobuf-java:3.6.1",
+        sha1 = "0d06d46ecfd92ec6d0f3b423b4cd81cb38d8b924",
+    )
+
+    native.maven_jar(
         name = "grpc_core_1_3_1",
         artifact = "io.grpc:grpc-core:1.3.1",
         sha1 = "a9b38b4a19af3ef208f4f6bf7871876d959c5eb1",
@@ -2241,6 +2283,48 @@
     )
 
     native.java_library(
+        name = "runtime_grpc_core",
+        visibility = ["//visibility:public"],
+        exports = ["@runtime_grpc_core//jar"],
+    )
+
+    native.java_library(
+        name = "runtime_grpc_stub",
+        visibility = ["//visibility:public"],
+        exports = ["@runtime_grpc_stub//jar"],
+    )
+
+    native.java_library(
+        name = "runtime_grpc_netty",
+        visibility = ["//visibility:public"],
+        exports = ["@runtime_grpc_netty//jar"],
+    )
+
+    native.java_library(
+        name = "runtime_grpc_auth",
+        visibility = ["//visibility:public"],
+        exports = ["@runtime_grpc_auth//jar"],
+    )
+
+    native.java_library(
+        name = "runtime_grpc_protobuf",
+        visibility = ["//visibility:public"],
+        exports = ["@runtime_grpc_protobuf//jar"],
+    )
+
+    native.java_library(
+        name = "runtime_grpc_protobuf_lite",
+        visibility = ["//visibility:public"],
+        exports = ["@runtime_grpc_protobuf_lite//jar"],
+    )
+
+    native.java_library(
+        name = "runtime_protobuf",
+        visibility = ["//visibility:public"],
+        exports = ["@runtime_protobuf//jar"],
+    )
+
+    native.java_library(
         name = "grpc_core_1_3_1",
         visibility = ["//visibility:public"],
         exports = ["@grpc_core_1_3_1//jar"],
@@ -2500,6 +2584,13 @@
 artifact_map["@concurrent_hashmap//jar"] = "mvn:com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:jar:NON-OSGI:1.0"
 artifact_map["@gnu_idn//jar"] = "mvn:org.gnu.inet:libidn:jar:NON-OSGI:1.15"
 artifact_map["@sigar//jar"] = "mvn:org.knowhowlab.osgi:sigar:jar:1.6.5_01"
+artifact_map["@runtime_grpc_core//jar"] = "mvn:io.grpc:grpc-core:jar:NON-OSGI:1.14.0"
+artifact_map["@runtime_grpc_stub//jar"] = "mvn:io.grpc:grpc-stub:jar:NON-OSGI:1.14.0"
+artifact_map["@runtime_grpc_netty//jar"] = "mvn:io.grpc:grpc-netty:jar:NON-OSGI:1.14.0"
+artifact_map["@runtime_grpc_auth//jar"] = "mvn:io.grpc:grpc-auth:jar:NON-OSGI:1.14.0"
+artifact_map["@runtime_grpc_protobuf//jar"] = "mvn:io.grpc:grpc-protobuf:jar:NON-OSGI:1.14.0"
+artifact_map["@runtime_grpc_protobuf_lite//jar"] = "mvn:io.grpc:grpc-protobuf-lite:jar:NON-OSGI:1.14.0"
+artifact_map["@runtime_protobuf//jar"] = "mvn:com.google.protobuf:protobuf-java:jar:3.6.1"
 artifact_map["@grpc_core_1_3_1//jar"] = "mvn:io.grpc:grpc-core:jar:NON-OSGI:1.3.1"
 artifact_map["@grpc_protobuf_1_3_1//jar"] = "mvn:io.grpc:grpc-protobuf:jar:NON-OSGI:1.3.1"
 artifact_map["@grpc_protobuf_lite_1_3_1//jar"] = "mvn:io.grpc:grpc-protobuf-lite:jar:NON-OSGI:1.3.1"