Skip to content

Commit

Permalink
Merge pull request #26370 from zakkak/new-export
Browse files Browse the repository at this point in the history
Export module's org.graalvm.sdk package org.graalvm.nativeimage.impl
  • Loading branch information
geoand authored Jun 27, 2022
2 parents 31932db + 8f3f3f0 commit d1443c9
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 d1443c9

Please sign in to comment.