Skip to content

Commit

Permalink
Export module's org.graalvm.sdk package org.graalvm.nativeimage.impl
Browse files Browse the repository at this point in the history
The package is no longer exported by default, see
oracle/graal@58bed51
  • Loading branch information
zakkak committed Jun 27, 2022
1 parent f94a8d0 commit 8f3f3f0
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,16 @@ GeneratedResourceBuildItem generateNativeResourcesList(List<NativeImageResourceB
}

@BuildStep(onlyIf = NativeOrNativeSourcesBuildGraal22_2OrLater.class)
JPMSExportBuildItem addExportsToNativeImage(List<JniRuntimeAccessBuildItem> jniRuntimeAccessibleClasses) {
void addExportsToNativeImage(BuildProducer<JPMSExportBuildItem> features,
List<JniRuntimeAccessBuildItem> jniRuntimeAccessibleClasses,
List<LambdaCapturingTypeBuildItem> lambdaCapturingTypeBuildItems,
List<NativeImageResourcePatternsBuildItem> 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() {
Expand Down

0 comments on commit 8f3f3f0

Please sign in to comment.