netty: Add Bazel target similar to netty-shaded

See census-instrumentation/opencensus-java#1963
This commit is contained in:
Eric Anderson 2019-08-21 08:25:03 -07:00
parent d5b63e9c68
commit 63661c7b70
3 changed files with 30 additions and 0 deletions

View File

@ -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"],
)

10
netty/shaded/BUILD.bazel Normal file
View File

@ -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",
],
)

View File

@ -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",