blob: f8eb2b3b01f2bca710125810ec7c941a514cd074 [file] [log] [blame]
Carmelo Casconec0b23a42019-04-25 13:50:54 -07001load("//tools/build/bazel:osgi_java_library.bzl", "wrapped_osgi_jar")
2
3# Wrap protobuf and grpc-related JARs in OSGi-compatible ones, since the
4# original ones are built with Bazel and NOT imported via mvn.
5
6wrapped_osgi_jar(
Carmelo Casconeb9536692019-05-28 18:15:23 -07007 # Differently from the official "grpc-api" package, here we also include
Carmelo Casconec0b23a42019-04-25 13:50:54 -07008 # "grpc-context" to solve the OSGI split-brain problem:
9 # https://github.com/grpc/grpc-java/issues/2727
Carmelo Casconeb9536692019-05-28 18:15:23 -070010 # We use patched Bazel BUILD files to package together api and context (see
Carmelo Casconec0b23a42019-04-25 13:50:54 -070011 # tools/build/bazel/grpc_workspace.bzl). If you need grpc-context as a
12 # compile-time dependency, please use this one.
Carmelo Casconeb9536692019-05-28 18:15:23 -070013 name = "io_grpc_grpc_api_context",
Carmelo Casconec0b23a42019-04-25 13:50:54 -070014 generate_pom = True,
Carmelo Casconeb9536692019-05-28 18:15:23 -070015 # Name resolver and load balancer providers which are part of the internal
16 # package are loaded dynamically, hence this import statement.
17 import_packages = "io.grpc.internal,*",
18 jar = "@io_grpc_grpc_java//api",
19 visibility = ["//visibility:public"],
20 deps = [],
21)
22
23wrapped_osgi_jar(
24 name = "io_grpc_grpc_core_inprocess",
25 generate_pom = True,
26 jar = "@io_grpc_grpc_java//core:inprocess",
27 visibility = ["//visibility:public"],
28 deps = [],
29)
30
31wrapped_osgi_jar(
32 name = "io_grpc_grpc_core_internal",
33 generate_pom = True,
34 jar = "@io_grpc_grpc_java//core:internal",
35 visibility = ["//visibility:public"],
36 deps = [],
37)
38
39wrapped_osgi_jar(
40 name = "io_grpc_grpc_core_util",
41 generate_pom = True,
42 jar = "@io_grpc_grpc_java//core:util",
43 visibility = ["//visibility:public"],
44 deps = [],
45)
46
47wrapped_osgi_jar(
Carmelo Casconec0b23a42019-04-25 13:50:54 -070048 name = "io_grpc_grpc_stub",
49 generate_pom = True,
50 jar = "@io_grpc_grpc_java//stub",
51 visibility = ["//visibility:public"],
52 deps = [],
53)
54
55wrapped_osgi_jar(
56 name = "io_grpc_grpc_netty",
57 generate_pom = True,
58 jar = "@io_grpc_grpc_java//netty",
59 visibility = ["//visibility:public"],
60 deps = [],
61)
62
63wrapped_osgi_jar(
64 name = "io_grpc_grpc_auth",
65 generate_pom = True,
66 jar = "@io_grpc_grpc_java//auth",
67 visibility = ["//visibility:public"],
68 deps = [],
69)
70
71wrapped_osgi_jar(
72 name = "io_grpc_grpc_protobuf",
73 generate_pom = True,
74 jar = "@io_grpc_grpc_java//protobuf",
75 visibility = ["//visibility:public"],
76 deps = [],
77)
78
79wrapped_osgi_jar(
80 name = "io_grpc_grpc_protobuf_lite",
81 generate_pom = True,
82 jar = "@io_grpc_grpc_java//protobuf-lite",
83 visibility = ["//visibility:public"],
84 deps = [],
85)
86
87wrapped_osgi_jar(
88 name = "com_google_protobuf_protobuf_java",
89 generate_pom = True,
90 jar = "@com_google_protobuf//:protobuf_java",
91 visibility = ["//visibility:public"],
92 deps = [],
93)