Skip to content

Commit 753994c

Browse files
committed
Only include deps we want; rename tcnative binaries
pom file looks good, but requires hacking uploadShadow to see locally. To use tcnative, you have to use: -Dio.grpc.netty.shaded.io.netty.packagePrefix=io.grpc.netty.shaded.
1 parent 5e42742 commit 753994c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

netty/shaded/build.gradle

+10-1
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,21 @@ description = "gRPC: Netty Shaded"
1414
dependencies {
1515
compile project(':grpc-netty')
1616
runtime libraries.netty_tcnative
17-
shadow project(':grpc-core') // TODO: why no work?
17+
shadow project(':grpc-core')
1818
}
1919

2020
shadowJar {
2121
classifier = null
22+
dependencies {
23+
include(project(':grpc-netty'))
24+
include(dependency('io.netty:'))
25+
}
2226
relocate 'io.grpc.netty', 'io.grpc.netty.shaded.io.grpc.netty'
2327
relocate 'io.netty', 'io.grpc.netty.shaded.io.netty'
28+
// We have to be careful with these replacements as they must not match any
29+
// string in NativeLibraryLoader, else they cause corruption. Note that
30+
// this includes concatenation of string literals and constants.
31+
relocate 'META-INF/native/libnetty', 'META-INF/native/libio-grpc-netty-shaded-netty'
32+
relocate 'META-INF/native/netty', 'META-INF/native/io-grpc-netty-shaded-netty'
2433
mergeServiceFiles()
2534
}

0 commit comments

Comments
 (0)