Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename netty-shaded native resources directory to avoid collisions #8270

Merged
merged 1 commit into from Sep 2, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion netty/shaded/build.gradle
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
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