Fix build of protobuf-related components to support Bazel 0.22

- Bumped version of protobuf to 3.6.1.3 (includes fix for Bazel 0.22)
- Removed all protobuf and grpc dependencies from deps.json. Instead,
  depends solely on what's provided by the external grpc and protobuf
  workspaces.
- Use OSGi-wrapped protobuf and grpc JARs built with Bazel for runtime
- Add missing netty-related bundles to onos-thirdparty-base (required
by grpc)

Note, build with Bazel 0.22 is still broken because of
osgi_java_library.bzl, unless the following build arg is used:
build --incompatible_string_is_not_iterable=false

It seems the error is caused by dead code in osgi_java_library.bzl
that should be removed.

Change-Id: I749f1de25902bf9df5242444380f7224bc99b4b5
diff --git a/tools/build/bazel/generate_workspace.bzl b/tools/build/bazel/generate_workspace.bzl
index f449018..3dbd378 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 Sat, 19 Jan 2019 00:49:49 GMT. Do not edit this file manually. *****
+# ***** This file was auto-generated at Tue, 29 Jan 2019 22:50:52 GMT. Do not edit this file manually. *****
 # ***** Use onos-lib-gen *****
 
 load("//tools/build/bazel:variables.bzl", "ONOS_GROUP_ID", "ONOS_VERSION")
@@ -122,23 +122,6 @@
     "@typesafe_config//jar",
     "@classgraph//jar",
 ]
-GRPC_1_3 = [
-    "@grpc_protobuf_1_3_1//jar",
-    "@grpc_stub_1_3_1//jar",
-    "@grpc_netty_1_3_1//jar",
-    "@grpc_auth_1_3_1//jar",
-    "@grpc_context_1_3_1//jar",
-    "@google_truth_0_28//jar",
-]
-GRPC_TEST_1_3 = [
-    "@grpc_testing_1_3_1//jar",
-    "@grpc_testing_proto_1_3_1//jar",
-    "@google_code_findbugs_3_0_0//jar",
-    "@google_errorprone_2_0_19//jar",
-    "@google_instrumentation_0_3_0//jar",
-    "@junit_dep//jar",
-    "@objenesis//jar",
-]
 
 def generated_maven_jars():
     if "aopalliance_repackaged" not in native.existing_rules():
@@ -1281,144 +1264,6 @@
             jar_sha256 = "5107e6b19b1d0ff2cfcd3baf0c25f0d444330273b1f2bec710e127c733f11455",
             licenses = ["notice"],
             jar_urls = ["http://repo1.maven.org/maven2/org/knowhowlab/osgi/sigar/1.6.5_01/sigar-1.6.5_01.jar"],        )
-    if "runtime_grpc_core" not in native.existing_rules():
-        java_import_external(
-            name = "runtime_grpc_core",
-            jar_sha256 = "3b44ca22df91034dc8d2e3fc404a623e6cc662287b82d5f32d4e1cae1f30cefb",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/grpc/grpc-core/1.14.0/grpc-core-1.14.0.jar"],        )
-    if "runtime_grpc_context" not in native.existing_rules():
-        java_import_external(
-            name = "runtime_grpc_context",
-            jar_sha256 = "d70c10bdd12cd62ba4563d0b060c6db8d9d8e6593a87791a122633b0c4fd70cc",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/grpc/grpc-context/1.14.0/grpc-context-1.14.0.jar"],        )
-    if "runtime_grpc_stub" not in native.existing_rules():
-        java_import_external(
-            name = "runtime_grpc_stub",
-            jar_sha256 = "96629499c47340a16e6ddfac705b68aa90129c10dfa659a0750adf4b5f958fad",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/grpc/grpc-stub/1.14.0/grpc-stub-1.14.0.jar"],        )
-    if "runtime_grpc_netty" not in native.existing_rules():
-        java_import_external(
-            name = "runtime_grpc_netty",
-            jar_sha256 = "44fb5890b32d30079e33654d14719363e5c86ae762f8c00ae3d68ef52618291a",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/grpc/grpc-netty/1.14.0/grpc-netty-1.14.0.jar"],        )
-    if "runtime_grpc_auth" not in native.existing_rules():
-        java_import_external(
-            name = "runtime_grpc_auth",
-            jar_sha256 = "854e4069110c770c483d863fc62eb3c17d776c4b9d4b1f38494b6a39ae186aaa",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/grpc/grpc-auth/1.14.0/grpc-auth-1.14.0.jar"],        )
-    if "runtime_grpc_protobuf" not in native.existing_rules():
-        java_import_external(
-            name = "runtime_grpc_protobuf",
-            jar_sha256 = "58cfe955238e854caeba371093f70252eaf151a7c82c2849970f682b3e460f4f",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/grpc/grpc-protobuf/1.14.0/grpc-protobuf-1.14.0.jar"],        )
-    if "runtime_grpc_protobuf_lite" not in native.existing_rules():
-        java_import_external(
-            name = "runtime_grpc_protobuf_lite",
-            jar_sha256 = "083b4c678192461cdb1f46199de2ee5a6dd6c691fd8b1ae28c263de8aa219dd4",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/grpc/grpc-protobuf-lite/1.14.0/grpc-protobuf-lite-1.14.0.jar"],        )
-    if "runtime_protobuf" not in native.existing_rules():
-        java_import_external(
-            name = "runtime_protobuf",
-            jar_sha256 = "fb66d913ff0578553b2e28a3338cbbbe2657e6cfe0e98d939f23aea219daf508",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.6.1/protobuf-java-3.6.1.jar"],        )
-    if "grpc_core_1_3_1" not in native.existing_rules():
-        java_import_external(
-            name = "grpc_core_1_3_1",
-            jar_sha256 = "5f5988c616a56b25bf413fdf01fd63c107257fdbc4b23367a073e17552907821",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/grpc/grpc-core/1.3.1/grpc-core-1.3.1.jar"],        )
-    if "grpc_protobuf_1_3_1" not in native.existing_rules():
-        java_import_external(
-            name = "grpc_protobuf_1_3_1",
-            jar_sha256 = "36dc04e5d31ab6d6405a21eb5110f178bfa1ae481aaef8b8cb2fe8675a7344f0",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/grpc/grpc-protobuf/1.3.1/grpc-protobuf-1.3.1.jar"],        )
-    if "grpc_protobuf_lite_1_3_1" not in native.existing_rules():
-        java_import_external(
-            name = "grpc_protobuf_lite_1_3_1",
-            jar_sha256 = "300229b1cef817a44221471c8e171b56f167226acbf74fc7776c7a421ec13792",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/grpc/grpc-protobuf-lite/1.3.1/grpc-protobuf-lite-1.3.1.jar"],        )
-    if "grpc_stub_1_3_1" not in native.existing_rules():
-        java_import_external(
-            name = "grpc_stub_1_3_1",
-            jar_sha256 = "ca3b1b8e68d31d3b12b2d2b7a989e7f74653de07a9465957f4840dbb55b777a7",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/grpc/grpc-stub/1.3.1/grpc-stub-1.3.1.jar"],        )
-    if "grpc_netty_1_3_1" not in native.existing_rules():
-        java_import_external(
-            name = "grpc_netty_1_3_1",
-            jar_sha256 = "6c72f0a2db9d4a10bfd24588f3c36180535f46000217addd34280fdefdf290d2",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/grpc/grpc-netty/1.3.1/grpc-netty-1.3.1.jar"],        )
-    if "grpc_auth_1_3_1" not in native.existing_rules():
-        java_import_external(
-            name = "grpc_auth_1_3_1",
-            jar_sha256 = "432360b6d5d6cb998bf1e051f1f5e12e5c70b3e633c1579ccced2f0478e528f5",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/grpc/grpc-auth/1.3.1/grpc-auth-1.3.1.jar"],        )
-    if "protobuf_java_3_3_0" not in native.existing_rules():
-        java_import_external(
-            name = "protobuf_java_3_3_0",
-            jar_sha256 = "f3411ade77523d5f0d013d4f25c36879e66f0c5e1e4310f7096d54d0d2553554",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.3.0/protobuf-java-3.3.0.jar"],        )
-    if "protobuf_java_3_2_0" not in native.existing_rules():
-        java_import_external(
-            name = "protobuf_java_3_2_0",
-            jar_sha256 = "b1c2d420d2833429d11e405a58251e13bd7e3f22c266b49227c41e4d21361286",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.2.0/protobuf-java-3.2.0.jar"],        )
-    if "grpc_testing_1_3_1" not in native.existing_rules():
-        java_import_external(
-            name = "grpc_testing_1_3_1",
-            jar_sha256 = "d6c5a7ee5bb4d67608d7a8a01f7b8a95ab3f7d3df5d84e5aa5f61f90545f2dcd",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/grpc/grpc-testing/1.3.1/grpc-testing-1.3.1.jar"],        )
-    if "grpc_testing_proto_1_3_1" not in native.existing_rules():
-        java_import_external(
-            name = "grpc_testing_proto_1_3_1",
-            jar_sha256 = "5b52005cccdbdbf63c29e28aab13ab796509345cf306d819cd4118131dadc254",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/grpc/grpc-testing-proto/1.3.1/grpc-testing-proto-1.3.1.jar"],        )
-    if "grpc_context_1_3_1" not in native.existing_rules():
-        java_import_external(
-            name = "grpc_context_1_3_1",
-            jar_sha256 = "a644cb308edd21ebce57876052785f171735e0d04905e5ff20741d4642981e74",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/grpc/grpc-context/1.3.1/grpc-context-1.3.1.jar"],        )
-    if "google_truth_0_28" not in native.existing_rules():
-        java_import_external(
-            name = "google_truth_0_28",
-            jar_sha256 = "1037ded3a681c74ce020e306f136b24a51c09c95667d8eda9ffc8f8136294f71",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/com/google/truth/truth/0.28/truth-0.28.jar"],        )
-    if "google_code_findbugs_3_0_0" not in native.existing_rules():
-        java_import_external(
-            name = "google_code_findbugs_3_0_0",
-            jar_sha256 = "bec0b24dcb23f9670172724826584802b80ae6cbdaba03bdebdef9327b962f6a",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.0/jsr305-3.0.0.jar"],        )
-    if "google_errorprone_2_0_19" not in native.existing_rules():
-        java_import_external(
-            name = "google_errorprone_2_0_19",
-            jar_sha256 = "cde78ace21e46398299d0d9c6be9f47b7f971c7f045d40c78f95be9a638cbf7e",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.0.19/error_prone_annotations-2.0.19.jar"],        )
-    if "google_instrumentation_0_3_0" not in native.existing_rules():
-        java_import_external(
-            name = "google_instrumentation_0_3_0",
-            jar_sha256 = "671f7147487877f606af2c7e39399c8d178c492982827305d3b1c7f5b04f1145",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/com/google/instrumentation/instrumentation-api/0.3.0/instrumentation-api-0.3.0.jar"],        )
 artifact_map = {}
 artifact_map["@aopalliance_repackaged//:aopalliance_repackaged"] = "mvn:org.glassfish.hk2.external:aopalliance-repackaged:jar:2.5.0-b42"
 artifact_map["@amqp_client//:amqp_client"] = "mvn:com.rabbitmq:amqp-client:jar:3.6.1"
@@ -1610,29 +1455,6 @@
 artifact_map["@concurrent_hashmap//:concurrent_hashmap"] = "mvn:com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:jar:NON-OSGI:1.0"
 artifact_map["@gnu_idn//:gnu_idn"] = "mvn:org.gnu.inet:libidn:jar:NON-OSGI:1.15"
 artifact_map["@sigar//:sigar"] = "mvn:org.knowhowlab.osgi:sigar:jar:1.6.5_01"
-artifact_map["@runtime_grpc_core//:runtime_grpc_core"] = "mvn:io.grpc:grpc-core:jar:NON-OSGI:1.14.0"
-artifact_map["@runtime_grpc_context//:runtime_grpc_context"] = "mvn:io.grpc:grpc-context:jar:NON-OSGI:1.14.0"
-artifact_map["@runtime_grpc_stub//:runtime_grpc_stub"] = "mvn:io.grpc:grpc-stub:jar:NON-OSGI:1.14.0"
-artifact_map["@runtime_grpc_netty//:runtime_grpc_netty"] = "mvn:io.grpc:grpc-netty:jar:NON-OSGI:1.14.0"
-artifact_map["@runtime_grpc_auth//:runtime_grpc_auth"] = "mvn:io.grpc:grpc-auth:jar:NON-OSGI:1.14.0"
-artifact_map["@runtime_grpc_protobuf//:runtime_grpc_protobuf"] = "mvn:io.grpc:grpc-protobuf:jar:NON-OSGI:1.14.0"
-artifact_map["@runtime_grpc_protobuf_lite//:runtime_grpc_protobuf_lite"] = "mvn:io.grpc:grpc-protobuf-lite:jar:NON-OSGI:1.14.0"
-artifact_map["@runtime_protobuf//:runtime_protobuf"] = "mvn:com.google.protobuf:protobuf-java:jar:3.6.1"
-artifact_map["@grpc_core_1_3_1//:grpc_core_1_3_1"] = "mvn:io.grpc:grpc-core:jar:NON-OSGI:1.3.1"
-artifact_map["@grpc_protobuf_1_3_1//:grpc_protobuf_1_3_1"] = "mvn:io.grpc:grpc-protobuf:jar:NON-OSGI:1.3.1"
-artifact_map["@grpc_protobuf_lite_1_3_1//:grpc_protobuf_lite_1_3_1"] = "mvn:io.grpc:grpc-protobuf-lite:jar:NON-OSGI:1.3.1"
-artifact_map["@grpc_stub_1_3_1//:grpc_stub_1_3_1"] = "mvn:io.grpc:grpc-stub:jar:NON-OSGI:1.3.1"
-artifact_map["@grpc_netty_1_3_1//:grpc_netty_1_3_1"] = "mvn:io.grpc:grpc-netty:jar:NON-OSGI:1.3.1"
-artifact_map["@grpc_auth_1_3_1//:grpc_auth_1_3_1"] = "mvn:io.grpc:grpc-auth:jar:NON-OSGI:1.3.1"
-artifact_map["@protobuf_java_3_3_0//:protobuf_java_3_3_0"] = "mvn:com.google.protobuf:protobuf-java:jar:3.3.0"
-artifact_map["@protobuf_java_3_2_0//:protobuf_java_3_2_0"] = "mvn:com.google.protobuf:protobuf-java:jar:3.2.0"
-artifact_map["@grpc_testing_1_3_1//:grpc_testing_1_3_1"] = "mvn:io.grpc:grpc-testing:jar:NON-OSGI:1.3.1"
-artifact_map["@grpc_testing_proto_1_3_1//:grpc_testing_proto_1_3_1"] = "mvn:io.grpc:grpc-testing-proto:jar:NON-OSGI:1.3.1"
-artifact_map["@grpc_context_1_3_1//:grpc_context_1_3_1"] = "mvn:io.grpc:grpc-context:jar:NON-OSGI:1.3.1"
-artifact_map["@google_truth_0_28//:google_truth_0_28"] = "mvn:com.google.truth:truth:jar:NON-OSGI:0.28"
-artifact_map["@google_code_findbugs_3_0_0//:google_code_findbugs_3_0_0"] = "mvn:com.google.code.findbugs:jsr305:jar:NON-OSGI:3.0.0"
-artifact_map["@google_errorprone_2_0_19//:google_errorprone_2_0_19"] = "mvn:com.google.errorprone:error_prone_annotations:jar:NON-OSGI:2.0.19"
-artifact_map["@google_instrumentation_0_3_0//:google_instrumentation_0_3_0"] = "mvn:com.google.instrumentation:instrumentation-api:jar:NON-OSGI:0.3.0"
 
 def maven_coordinates(label):
     label_string = str(label)