Skip to content

Commit 158780a

Browse files
committed
Add io.netty.versions.properties to native image resources
1 parent aa93848 commit 158780a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

extensions/netty/deployment/src/main/java/io/quarkus/netty/deployment/NettyProcessor.java

+9
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import io.quarkus.deployment.annotations.Record;
2626
import io.quarkus.deployment.builditem.SystemPropertyBuildItem;
2727
import io.quarkus.deployment.builditem.nativeimage.NativeImageConfigBuildItem;
28+
import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
2829
import io.quarkus.deployment.builditem.nativeimage.NativeImageSystemPropertyBuildItem;
2930
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
3031
import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
@@ -371,6 +372,14 @@ LogCleanupFilterBuildItem cleanupMacDNSInLog() {
371372
"Can not find io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider in the classpath");
372373
}
373374

375+
/**
376+
* `Version.identify()` in netty-common uses the resource to determine the version of netty.
377+
*/
378+
@BuildStep
379+
NativeImageResourceBuildItem nettyVersions() {
380+
return new NativeImageResourceBuildItem("META-INF/io.netty.versions.properties");
381+
}
382+
374383
private String calculateMaxOrder(OptionalInt userConfig, List<MinNettyAllocatorMaxOrderBuildItem> minMaxOrderBuildItems,
375384
boolean shouldWarn) {
376385
int result = DEFAULT_NETTY_ALLOCATOR_MAX_ORDER;

0 commit comments

Comments
 (0)