Skip to content

Commit

Permalink
Merge pull request #43805 from ozangunalp/netty_versions
Browse files Browse the repository at this point in the history
Add io.netty.versions.properties to native image resources
  • Loading branch information
gsmet authored Oct 14, 2024
2 parents 78b5a1c + 158780a commit b9fc36d
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import io.quarkus.deployment.annotations.Record;
import io.quarkus.deployment.builditem.SystemPropertyBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageConfigBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageSystemPropertyBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
Expand Down Expand Up @@ -371,6 +372,14 @@ LogCleanupFilterBuildItem cleanupMacDNSInLog() {
"Can not find io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider in the classpath");
}

/**
* `Version.identify()` in netty-common uses the resource to determine the version of netty.
*/
@BuildStep
NativeImageResourceBuildItem nettyVersions() {
return new NativeImageResourceBuildItem("META-INF/io.netty.versions.properties");
}

private String calculateMaxOrder(OptionalInt userConfig, List<MinNettyAllocatorMaxOrderBuildItem> minMaxOrderBuildItems,
boolean shouldWarn) {
int result = DEFAULT_NETTY_ALLOCATOR_MAX_ORDER;
Expand Down

0 comments on commit b9fc36d

Please sign in to comment.