Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion netty/shaded/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,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
Original file line number Diff line number Diff line change
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