First attempt at supporting builds with Java 11
Includes:
- Bump protobuf to 3.8.0 and grpc-java to 1.21.0 (along with transitive
dependencies such as Netty)
- Add jaxb_api at compile time when needed (removed in JDK 11)
- Bump Bnd to 4.1 (adds support for Java 11)
To build with JDK 11, uncomment lines in .bazelrc.
Tested with Bazel 0.26.0.
Change-Id: Ib8e0c7310eacf97328762606e57c01e4834e5565
diff --git a/lib/BUILD b/lib/BUILD
index 52c4ea6..cfb43b5 100644
--- a/lib/BUILD
+++ b/lib/BUILD
@@ -4,15 +4,50 @@
# original ones are built with Bazel and NOT imported via mvn.
wrapped_osgi_jar(
- # Differently from the official "grpc-core" package, here we also include
+ # Differently from the official "grpc-api" package, here we also include
# "grpc-context" to solve the OSGI split-brain problem:
# https://github.com/grpc/grpc-java/issues/2727
- # We use patched Bazel BUILD files to package together core and context (see
+ # We use patched Bazel BUILD files to package together api and context (see
# tools/build/bazel/grpc_workspace.bzl). If you need grpc-context as a
# compile-time dependency, please use this one.
- name = "io_grpc_grpc_core_context",
+ name = "io_grpc_grpc_api_context",
generate_pom = True,
- jar = "@io_grpc_grpc_java//core",
+ # Name resolver and load balancer providers which are part of the internal
+ # package are loaded dynamically, hence this import statement.
+ import_packages = "io.grpc.internal,*",
+ jar = "@io_grpc_grpc_java//api",
+ visibility = ["//visibility:public"],
+ deps = [],
+)
+
+wrapped_osgi_jar(
+ name = "io_grpc_grpc_core_inprocess",
+ generate_pom = True,
+ jar = "@io_grpc_grpc_java//core:inprocess",
+ visibility = ["//visibility:public"],
+ deps = [],
+)
+
+wrapped_osgi_jar(
+ name = "io_grpc_grpc_core_internal",
+ generate_pom = True,
+ jar = "@io_grpc_grpc_java//core:internal",
+ visibility = ["//visibility:public"],
+ deps = [],
+)
+
+wrapped_osgi_jar(
+ name = "io_grpc_grpc_core_util",
+ generate_pom = True,
+ jar = "@io_grpc_grpc_java//core:util",
+ visibility = ["//visibility:public"],
+ deps = [],
+)
+
+wrapped_osgi_jar(
+ name = "io_grpc_grpc_core_perfmark",
+ generate_pom = True,
+ jar = "@io_grpc_grpc_java//core:perfmark",
visibility = ["//visibility:public"],
deps = [],
)