Skip to content

Commit

Permalink
netty-shaded: Rename the directory of netty shaded resources to avoid…
Browse files Browse the repository at this point in the history
… collisions
  • Loading branch information
dzou committed Sep 2, 2021
1 parent 0838b73 commit ffebe23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion netty/shaded/build.gradle
Expand Up @@ -110,8 +110,9 @@ class NettyResourceTransformer implements Transformer {

@Override
void transform(TransformerContext context) {
String updatedPath = context.path.replace("io.netty", "io.grpc.netty.shaded.io.netty")
String updatedContent = context.is.getText().replace("io.netty", "io.grpc.netty.shaded.io.netty")
resources.put(context.path, updatedContent)
resources.put(updatedPath, updatedContent)
}

@Override
Expand Down
Expand Up @@ -78,7 +78,8 @@ public void noNormalNetty() throws Exception {
@Test
public void nettyResourcesUpdated() throws IOException {
InputStream inputStream = NettyChannelBuilder.class.getClassLoader()
.getResourceAsStream("META-INF/native-image/io.netty/transport/reflection-config.json");
.getResourceAsStream(
"META-INF/native-image/io.grpc.netty.shaded.io.netty/transport/reflection-config.json");
assertThat(inputStream).isNotNull();

Scanner s = new Scanner(inputStream, StandardCharsets.UTF_8.name()).useDelimiter("\\A");
Expand Down

0 comments on commit ffebe23

Please sign in to comment.