Bumped version of gRPC to 1.3.1

Change-Id: I7798476bd443a796e0e6a6e149ab8f66435ba4fa
diff --git a/incubator/grpc-dependencies/BUCK b/incubator/grpc-dependencies/BUCK
index 7179dc9..e36dc17 100644
--- a/incubator/grpc-dependencies/BUCK
+++ b/incubator/grpc-dependencies/BUCK
@@ -1,34 +1,34 @@
 include_defs('//bucklets/grpc.bucklet')
 
-fetch_grpc_plugin(version = '1.3.0')
+fetch_grpc_plugin(version = '1.3.1')
 
-# Repackaging of gRPC 1.3.0 to solve the OSGI split package issue.
+# Repackaging of gRPC 1.3.* to solve the OSGI split package issue.
 # If bumping the gRPC version, please write a new rule.
 
-def grpc_core_repkg_130():
+def grpc_core_repkg_131():
     repkg_deps = [
         '//lib:COMPILE',
         '//lib:google-instrumentation-0.3.0',
         "//lib:google-errorprone-2.0.19"
     ]
     remote_file(
-        name = "grpc-src-zip-130",
-        url = "https://github.com/grpc/grpc-java/archive/v1.3.0.zip",
-        sha1 = "aae4368c7e4c4666236238e31be3a529e153cc02",
+        name = "grpc-src-zip-131",
+        url = "https://github.com/grpc/grpc-java/archive/v1.3.1.zip",
+        sha1 = "03dc21440fdfa920aa0e905da17df35b0d6c9a44",
     )
     srcs = []
     for pkg in ['core', 'context']:
         name = 'grpc-' + pkg + '-130'
         genrule(
             name = name,
-            bash = 'jar xf $(location :grpc-src-zip-130) grpc-java-1.3.0/' + pkg + '/src/main/java '
-            + '&& cd grpc-java-1.3.0/' + pkg + '/src/main/java '
+            bash = 'jar xf $(location :grpc-src-zip-131) grpc-java-1.3.1/' + pkg + '/src/main/java '
+            + '&& cd grpc-java-1.3.1/' + pkg + '/src/main/java '
             + '&& jar -cf $OUT *',
             out = pkg + '.src.zip',
         )
         srcs.append(':' + name)
     osgi_jar(
-        name = 'grpc-core-repkg-1.3.0',
+        name = 'grpc-core-repkg-1.3.1',
         srcs = srcs,
         deps = repkg_deps,
         package_name_root = 'io.grpc',
@@ -38,4 +38,4 @@
         do_checkstyle = False,
     )
 
-grpc_core_repkg_130()
\ No newline at end of file
+grpc_core_repkg_131()
diff --git a/incubator/protobuf/api/BUCK b/incubator/protobuf/api/BUCK
index 9ae1ccf..13a04d4 100644
--- a/incubator/protobuf/api/BUCK
+++ b/incubator/protobuf/api/BUCK
@@ -1,6 +1,6 @@
 COMPILE_DEPS = [
     '//lib:CORE_DEPS',
-    '//incubator/grpc-dependencies:grpc-core-repkg-1.3.0'
+    '//incubator/grpc-dependencies:grpc-core-repkg-1.3.1'
 ]
 
 TEST_DEPS = [
diff --git a/incubator/protobuf/models/BUCK b/incubator/protobuf/models/BUCK
index 81a9b25..2fc2d4b 100644
--- a/incubator/protobuf/models/BUCK
+++ b/incubator/protobuf/models/BUCK
@@ -1,17 +1,18 @@
+GRPC_VER = '1.3.1'
 
 COMPILE_DEPS = [
     '//lib:CORE_DEPS',
     ':onos-incubator-protobuf-models-proto',
     '//lib:protobuf-java-3.2.0',
     '//lib:GRPC_1.3',
-    '//incubator/grpc-dependencies:grpc-core-repkg-1.3.0'
+    '//incubator/grpc-dependencies:grpc-core-repkg-' + GRPC_VER
 ]
 
 GRPC_DEPS = [
     '//lib:GRPC_1.3',
     '//lib:protobuf-java-3.2.0',
     '//lib:guava',
-    '//incubator/grpc-dependencies:grpc-core-repkg-1.3.0'
+    '//incubator/grpc-dependencies:grpc-core-repkg-' + GRPC_VER
 ]
 
 BUNDLES = [
diff --git a/incubator/protobuf/registry/BUCK b/incubator/protobuf/registry/BUCK
index e6a339d..2b49f88 100644
--- a/incubator/protobuf/registry/BUCK
+++ b/incubator/protobuf/registry/BUCK
@@ -1,8 +1,10 @@
+GRPC_VER = '1.3.1'
+
 COMPILE_DEPS = [
     '//lib:CORE_DEPS',
     '//lib:NETTY',
     '//lib:GRPC_1.3',
-    '//incubator/grpc-dependencies:grpc-core-repkg-1.3.0',
+    '//incubator/grpc-dependencies:grpc-core-repkg-' + GRPC_VER,
     '//incubator/protobuf/api:onos-grpc-api'
 ]
 
@@ -13,7 +15,7 @@
 onos_app (
     title = 'Grpc Service Registry',
     app_name = "org.onosproject.grpc.registry",
-    included_bundles = ['//incubator/grpc-dependencies:grpc-core-repkg-1.3.0',
+    included_bundles = ['//incubator/grpc-dependencies:grpc-core-repkg-' + GRPC_VER,
         '//lib:google-instrumentation-0.3.0'],
     category = 'TODO',
     url = 'http://onosproject.org',
diff --git a/incubator/protobuf/services/nb/BUCK b/incubator/protobuf/services/nb/BUCK
index f2528a4..49787ec 100644
--- a/incubator/protobuf/services/nb/BUCK
+++ b/incubator/protobuf/services/nb/BUCK
@@ -1,3 +1,4 @@
+GRPC_VER = '1.3.1'
 
 COMPILE_DEPS = [
     '//lib:CORE_DEPS',
@@ -6,14 +7,14 @@
     '//incubator/protobuf/models:onos-incubator-protobuf-models',
     '//lib:protobuf-java-3.2.0',
     '//lib:GRPC_1.3',
-    '//incubator/grpc-dependencies:grpc-core-repkg-1.3.0',
-    '//lib:grpc-protobuf-lite-1.3.0',
+    '//incubator/grpc-dependencies:grpc-core-repkg-' + GRPC_VER,
+    '//lib:grpc-protobuf-lite-' + GRPC_VER,
     '//incubator/protobuf/api:onos-grpc-api'
 ]
 
 GRPC_DEPS = [
     '//lib:GRPC_1.3',
-    '//incubator/grpc-dependencies:grpc-core-repkg-1.3.0',
+    '//incubator/grpc-dependencies:grpc-core-repkg-' + GRPC_VER,
     '//incubator/protobuf/models:onos-incubator-protobuf-models-proto',
     '//lib:protobuf-java-3.2.0',
     '//lib:guava',
@@ -26,13 +27,13 @@
     ':onos-incubator-protobuf-services-nb-proto',
     '//lib:protobuf-java-3.2.0',
     '//lib:guava',
-    '//lib:grpc-core-1.3.0',
-    '//incubator/grpc-dependencies:grpc-core-repkg-1.3.0',
-    '//lib:grpc-protobuf-1.3.0',
-    '//lib:grpc-stub-1.3.0',
-    '//lib:grpc-netty-1.3.0',
-    '//lib:grpc-auth-1.3.0',
-    '//lib:grpc-context-1.3.0',
+    '//lib:grpc-core-' + GRPC_VER,
+    '//incubator/grpc-dependencies:grpc-core-repkg-' + GRPC_VER,
+    '//lib:grpc-protobuf-' + GRPC_VER,
+    '//lib:grpc-stub-' + GRPC_VER,
+    '//lib:grpc-netty-' + GRPC_VER,
+    '//lib:grpc-auth-' + GRPC_VER,
+    '//lib:grpc-context-' + GRPC_VER,
     '//lib:google-truth-0.28',
     '//core/api:onos-api',
     '//lib:netty-transport',
@@ -65,7 +66,7 @@
     app_name = "org.onosproject.grpc.nb.service",
     category = 'TODO',
     url = 'http://onosproject.org',
-    included_bundles = ['//incubator/grpc-dependencies:grpc-core-repkg-1.3.0',
+    included_bundles = ['//incubator/grpc-dependencies:grpc-core-repkg-' + GRPC_VER,
             '//lib:google-instrumentation-0.3.0'],
     description = 'gRPC northbound services used to provide fine-grained access to ONOS native northbound interface from off-platform applications',
 )