Carmelo Cascone | c0b23a4 | 2019-04-25 13:50:54 -0700 | [diff] [blame] | 1 | load("//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 | |
| 6 | wrapped_osgi_jar( |
Carmelo Cascone | b953669 | 2019-05-28 18:15:23 -0700 | [diff] [blame] | 7 | # Differently from the official "grpc-api" package, here we also include |
Carmelo Cascone | c0b23a4 | 2019-04-25 13:50:54 -0700 | [diff] [blame] | 8 | # "grpc-context" to solve the OSGI split-brain problem: |
| 9 | # https://github.com/grpc/grpc-java/issues/2727 |
Carmelo Cascone | b953669 | 2019-05-28 18:15:23 -0700 | [diff] [blame] | 10 | # We use patched Bazel BUILD files to package together api and context (see |
Carmelo Cascone | c0b23a4 | 2019-04-25 13:50:54 -0700 | [diff] [blame] | 11 | # tools/build/bazel/grpc_workspace.bzl). If you need grpc-context as a |
| 12 | # compile-time dependency, please use this one. |
Carmelo Cascone | b953669 | 2019-05-28 18:15:23 -0700 | [diff] [blame] | 13 | name = "io_grpc_grpc_api_context", |
Carmelo Cascone | c0b23a4 | 2019-04-25 13:50:54 -0700 | [diff] [blame] | 14 | generate_pom = True, |
Carmelo Cascone | b953669 | 2019-05-28 18:15:23 -0700 | [diff] [blame] | 15 | # 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 | |
| 23 | wrapped_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 | |
| 31 | wrapped_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 | |
| 39 | wrapped_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 | |
| 47 | wrapped_osgi_jar( |
Carmelo Cascone | c0b23a4 | 2019-04-25 13:50:54 -0700 | [diff] [blame] | 48 | name = "io_grpc_grpc_stub", |
| 49 | generate_pom = True, |
| 50 | jar = "@io_grpc_grpc_java//stub", |
| 51 | visibility = ["//visibility:public"], |
| 52 | deps = [], |
| 53 | ) |
| 54 | |
| 55 | wrapped_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 | |
| 63 | wrapped_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 | |
| 71 | wrapped_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 | |
| 79 | wrapped_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 | |
| 87 | wrapped_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 | ) |