Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

[Feature Request] Add task to invoke target application with Graal JVM and native-image-agent to generate config #376

Open
seanabraham opened this issue Aug 7, 2020 · 0 comments

Comments

@seanabraham
Copy link

seanabraham commented Aug 7, 2020

What happened?

Presently it's a little cumbersome to generate the native image config graal needs for programs that may use reflection. One such way of doing it includes using the Graal JVM and running the application with native-image-agent enabled and pointing to a config dir. This method is described here.

Doing this manually currently requires doing something like the following:

./gradlew installDist # to build the application and install start scripts
JAVA_HOME=~/.gradle/caches/com.palantir.graal/19.2.0/graalvm-ce-19.2.0/Contents/Home JAVA_OPTS=-agentlib:native-image-agent=config-output-dir=./native-image-config build/install/app-name/bin/app-name application-arguments-here

It would be quite convenient if there was a task provided by this plugin that was similar to the run task provided by the application but made sure to run against the Graal JVM with the right flags specified to make it easier to emit the native image config in cases when the application can run locally (saving the hassle of doing what I specified above).

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

No branches or pull requests

1 participant