Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export module's org.graalvm.sdk package org.graalvm.nativeimage.impl #26370

Merged
merged 1 commit into from
Jun 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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