Bazel build for the combined GRPC runtime jar file
Change-Id: I76ff5f1b81a0985cb45c70c8f63640668207cd4e
diff --git a/tools/build/bazel/grpc_BUILD b/tools/build/bazel/grpc_BUILD
new file mode 100644
index 0000000..24795da
--- /dev/null
+++ b/tools/build/bazel/grpc_BUILD
@@ -0,0 +1,44 @@
+"""
+ Copyright 2018-present Open Networking Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
+
+
+"""
+ Bazel build file for GRPC java binaries. This build file is injected into the GRPC source tree to allow
+ ONOS to build it. Published binaries of the GRPC library split the definition of the io.grpc
+ package across multiple jar files. This renders them unusable in an OSGI environment, so
+ ONOS builds its own libraries here.
+"""
+
+GRPC_COMPILE = [
+ "@google_errorprone_2_0_19//jar",
+ "@google_instrumentation_0_3_0//jar",
+ "@guava//jar",
+ "@javax_annotation_api//jar",
+ "@jsr305//jar",
+ "@junit//jar",
+]
+
+java_library(
+ name = "grpc-core-repkg-1.3.1-native",
+ srcs = glob(
+ [
+ "context/src/main/java/**/*.java",
+ "core/src/main/java/**/*.java",
+ ],
+ ),
+ visibility = ["//visibility:public"],
+ deps = GRPC_COMPILE,
+)