diff --git a/netty/BUILD.bazel b/netty/BUILD.bazel index f7c04ca86e2..a5a6a538228 100644 --- a/netty/BUILD.bazel +++ b/netty/BUILD.bazel @@ -27,3 +27,11 @@ java_library( "@io_perfmark_perfmark_api//jar", ], ) + +# Not actually shaded, but mirrors the shaded dependencies included in the +# artifact on Maven Central for usage with maven_install's override_targets. +java_library( + name = "shaded", + visibility = ["//visibility:public"], + exports = ["//netty/shaded"], +) diff --git a/netty/shaded/BUILD.bazel b/netty/shaded/BUILD.bazel new file mode 100644 index 00000000000..096001c4416 --- /dev/null +++ b/netty/shaded/BUILD.bazel @@ -0,0 +1,10 @@ +# Publicly exposed in //netty package. Purposefully does not export any symbols. +java_library( + name = "shaded", + visibility = ["//netty:__pkg__"], + runtime_deps = [ + "//netty", + "@io_netty_netty_tcnative_boringssl_static//jar", + "@io_netty_netty_transport_native_epoll//jar", + ], +) diff --git a/repositories.bzl b/repositories.bzl index 53bc745823c..6672da4e007 100644 --- a/repositories.bzl +++ b/repositories.bzl @@ -25,6 +25,7 @@ def grpc_java_repositories( omit_io_netty_buffer = False, omit_io_netty_common = False, omit_io_netty_transport = False, + omit_io_netty_transport_native_epoll = False, omit_io_netty_codec = False, omit_io_netty_codec_socks = False, omit_io_netty_codec_http = False, @@ -84,6 +85,8 @@ def grpc_java_repositories( io_netty_common() if not omit_io_netty_transport: io_netty_transport() + if not omit_io_netty_transport_native_epoll: + io_netty_transport_native_epoll() if not omit_io_netty_codec: io_netty_codec() if not omit_io_netty_codec_socks: @@ -383,6 +386,15 @@ def io_netty_transport(): licenses = ["notice"], # Apache 2.0 ) +def io_netty_transport_native_epoll(): + jvm_maven_import_external( + name = "io_netty_netty_transport_native_epoll", + artifact = "io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.38.Final", + server_urls = ["http://central.maven.org/maven2"], + artifact_sha256 = "7933467e1cfc37bc6fb3f22af471ed69cb66bebaceab73d2041772bb6a38218a", + licenses = ["notice"], # Apache 2.0 + ) + def io_opencensus_api(): jvm_maven_import_external( name = "io_opencensus_opencensus_api",