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

Unable to configure configurationFileDirectories for task nativeCompile #587

Open
tglaeser opened this issue Mar 21, 2024 · 1 comment
Open
Assignees
Labels
question Further information is requested

Comments

@tglaeser
Copy link

tglaeser commented Mar 21, 2024

Description
Task nativeTestCompile works as described in the docs as it executes command native-image with entry build/native/agent-output/test added to the -H:ConfigurationFileDirectories parameter.

Now, if I gathered the metadata first by running ./gradlew -Pagent test, I would like to add entry build/native/agent-output/test to the -H:ConfigurationFileDirectories parameter of command native-image executed by task nativeCompile; how do I do that? Otherwise task nativeRun will not be successful giving the metadata is not included in the generated image. I see that task nativeCompile has property options.get().asCompileOptions().configurationFileDirectories which doesn't seem to be mutable at configuration time; what am I missing?

Additional context
n/a

System Info (please complete the following information):

  • OS: Linux 5.15.146.1-microsoft-standard-WSL2 GNU/Linux
  • GraalVM Version: Java(TM) SE Runtime Environment Oracle GraalVM 21.0.2+13.1
  • Java Version: 21
  • Plugin version: native-gradle-plugin:0.10.1
@tglaeser tglaeser added the question Further information is requested label Mar 21, 2024
@tglaeser
Copy link
Author

@fniephaus, @melix - Your input please on the issue.

I'm aware that there are workarounds to successfully launch the application. But I don't necessarily want to include the metadata in the production Java ARchive, given that you are using -H:ConfigurationFileDirectories in the test scenario I would assume one want to do the same in the production scenario; do you agree with that?

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

No branches or pull requests

2 participants