Adding build tools for gRPC compilation.
ONOS-6095

Change-Id: I80687eb2a91ad60c4dbec0bb966e917555d46151
diff --git a/incubator/grpc-dependencies/BUCK b/incubator/grpc-dependencies/BUCK
new file mode 100644
index 0000000..393524a
--- /dev/null
+++ b/incubator/grpc-dependencies/BUCK
@@ -0,0 +1,3 @@
+include_defs('//bucklets/grpc.bucklet')
+
+fetch_grpc_plugin_binary()
\ No newline at end of file
diff --git a/incubator/protobuf-dependencies/BUCK b/incubator/protobuf-dependencies/BUCK
new file mode 100644
index 0000000..825a324
--- /dev/null
+++ b/incubator/protobuf-dependencies/BUCK
@@ -0,0 +1,3 @@
+include_defs('//bucklets/grpc.bucklet')
+
+fetch_protoc_binary()
\ No newline at end of file
diff --git a/incubator/protobuf/BUCK b/incubator/protobuf/BUCK
new file mode 100644
index 0000000..3422455
--- /dev/null
+++ b/incubator/protobuf/BUCK
@@ -0,0 +1,25 @@
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    ':onos-incubator-grpc',
+    '//lib:protobuf-java-3.2.0',
+]
+
+GRPC_DEPS = [
+    '//lib:GRPC_1.3',
+    '//lib:protobuf-java-3.2.0',
+    '//lib:guava'
+]
+
+grpc_jar(
+    name = 'onos-incubator-grpc',
+    deps = GRPC_DEPS,
+    proto_paths = ["$ONOS_ROOT/incubator/protobuf/src/main/proto"]
+)
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+
diff --git a/incubator/protobuf/src/main/proto/Device.proto b/incubator/protobuf/src/main/proto/models/Device.proto
similarity index 100%
rename from incubator/protobuf/src/main/proto/Device.proto
rename to incubator/protobuf/src/main/proto/models/Device.proto
diff --git a/incubator/protobuf/src/main/proto/DeviceEvent.proto b/incubator/protobuf/src/main/proto/models/DeviceEvent.proto
similarity index 90%
rename from incubator/protobuf/src/main/proto/DeviceEvent.proto
rename to incubator/protobuf/src/main/proto/models/DeviceEvent.proto
index 6a88768..f834aa1 100644
--- a/incubator/protobuf/src/main/proto/DeviceEvent.proto
+++ b/incubator/protobuf/src/main/proto/models/DeviceEvent.proto
@@ -2,8 +2,8 @@
 option java_package = "org.onosproject.grpc.net";
 
 
-import "Device.proto";
-import "Port.proto";
+import "models/Device.proto";
+import "models/Port.proto";
 
 package DeviceEvent;
 
diff --git a/incubator/protobuf/src/main/proto/Link.proto b/incubator/protobuf/src/main/proto/models/Link.proto
similarity index 100%
rename from incubator/protobuf/src/main/proto/Link.proto
rename to incubator/protobuf/src/main/proto/models/Link.proto
diff --git a/incubator/protobuf/src/main/proto/LinkEvent.proto b/incubator/protobuf/src/main/proto/models/LinkEvent.proto
similarity index 92%
rename from incubator/protobuf/src/main/proto/LinkEvent.proto
rename to incubator/protobuf/src/main/proto/models/LinkEvent.proto
index fdd6580..fcd13fb 100644
--- a/incubator/protobuf/src/main/proto/LinkEvent.proto
+++ b/incubator/protobuf/src/main/proto/models/LinkEvent.proto
@@ -3,7 +3,7 @@
 
 package LinkEvent;
 
-import "Link.proto";
+import "models/Link.proto";
 
 // Corresponds to org.onosproject.net.link.LinkEvent.
 message LinkNotification {
diff --git a/incubator/protobuf/src/main/proto/Port.proto b/incubator/protobuf/src/main/proto/models/Port.proto
similarity index 100%
rename from incubator/protobuf/src/main/proto/Port.proto
rename to incubator/protobuf/src/main/proto/models/Port.proto
diff --git a/incubator/rpc-grpc/src/main/proto/DeviceService.proto b/incubator/rpc-grpc/src/main/proto/DeviceService.proto
index 7ac8489..5ae7cd6 100644
--- a/incubator/rpc-grpc/src/main/proto/DeviceService.proto
+++ b/incubator/rpc-grpc/src/main/proto/DeviceService.proto
@@ -1,8 +1,8 @@
 syntax = "proto3";
 option java_package = "org.onosproject.grpc.net.device";
 
-import "Device.proto";
-import "Port.proto";
+import "models/Device.proto";
+import "models/Port.proto";
 
 package Device;
 
diff --git a/incubator/rpc-grpc/src/main/proto/LinkService.proto b/incubator/rpc-grpc/src/main/proto/LinkService.proto
index 99e0f22..ee32453 100644
--- a/incubator/rpc-grpc/src/main/proto/LinkService.proto
+++ b/incubator/rpc-grpc/src/main/proto/LinkService.proto
@@ -1,7 +1,7 @@
 syntax = "proto3";
 option java_package = "org.onosproject.grpc.net.link";
 
-import "Link.proto";
+import "models/Link.proto";
 
 package Link;