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

Allow configuring additional entries for native image classpath #93

Open
dmurat opened this issue Nov 27, 2020 · 2 comments
Open

Allow configuring additional entries for native image classpath #93

dmurat opened this issue Nov 27, 2020 · 2 comments

Comments

@dmurat
Copy link

dmurat commented Nov 27, 2020

It would be great to have the ability to configure additional entries for the native-image --class-path option.

For some reasons I ended up writing [programmatic registration] (https://www.graalvm.org/reference-manual/native-image/Reflection/) for Graal runtime reflection via org.graalvm.nativeimage.hosted.Feature interface, where implementation needs to use external dependency.

In this situation, I will like to have the ability to configure that dependency as compileOnly, but still be able to provide it as part of the classpath for the native-image tool. I guess something like an additional Gradle configuration like graalNativeImageDependencies would solve the problem if the plugin takes it into account during the generation of the native-image classpath.

The current workaround is to use the implementation configuration for that external dependency, which is not ideal, I think.

Tnx.

@melix
Copy link
Collaborator

melix commented Aug 24, 2021

This plugin is going to use, at some point, the official GraalVM native image plugin. This plugin offers an extension, NativeImageOptions which lets you add things on classpath. However, I think it's a good idea to have an additional configuration which is used to declare dependencies which are only required at image build time. Would you mind creating an issue on the official GraalVM plugin for this?

@dmurat
Copy link
Author

dmurat commented Aug 27, 2021

Sure, here it is: graalvm/native-build-tools#129

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants