From 8f3f3f004296c29bd2447c60cff273ac6265350c Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Mon, 27 Jun 2022 10:19:54 +0300 Subject: [PATCH] Export module's org.graalvm.sdk package org.graalvm.nativeimage.impl The package is no longer exported by default, see https://github.com/oracle/graal/commit/58bed51f26192cba88231a7605cfd7d8761a6088 --- .../deployment/steps/NativeImageFeatureStep.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/steps/NativeImageFeatureStep.java b/core/deployment/src/main/java/io/quarkus/deployment/steps/NativeImageFeatureStep.java index 3e0881d9fc5f4..f2594d4039865 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/steps/NativeImageFeatureStep.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/steps/NativeImageFeatureStep.java @@ -119,12 +119,16 @@ GeneratedResourceBuildItem generateNativeResourcesList(List jniRuntimeAccessibleClasses) { + void addExportsToNativeImage(BuildProducer features, + List jniRuntimeAccessibleClasses, + List lambdaCapturingTypeBuildItems, + List resourcePatterns) { + // required in order to access org.graalvm.nativeimage.impl.RuntimeSerializationSupport and org.graalvm.nativeimage.impl.ConfigurationCondition + features.produce(new JPMSExportBuildItem("org.graalvm.sdk", "org.graalvm.nativeimage.impl")); // required in order to access com.oracle.svm.core.jni.JNIRuntimeAccess if (jniRuntimeAccessibleClasses != null && !jniRuntimeAccessibleClasses.isEmpty()) { - return new JPMSExportBuildItem("org.graalvm.nativeimage.builder", "com.oracle.svm.core.jni"); + features.produce(new JPMSExportBuildItem("org.graalvm.nativeimage.builder", "com.oracle.svm.core.jni")); } - return null; } private boolean graalVM22_2OrLater() {