micronaut-projects / micronaut-gradle-plugin

A Gradle Plugin for Micronaut
Apache License 2.0
65 stars 43 forks source link

Unable to configure `configurationFileDirectories` for task `dockerfileNative` #969

Open tglaeser opened 3 months ago

tglaeser commented 3 months ago

Issue description

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 dockerfileNative; how do I do that? Otherwise task dockerBuildNative will not be successful giving the metadata is not included in the generated image. I see that task dockerfileNative has property nativeImageOptions.get().asCompileOptions().configurationFileDirectories which doesn't seem to be mutable at configuration time; what am I missing?

Additional context The question I'm asking here for the micronaut-docker-plugin as very similar to the question I asked with the native-gradle-plugin.

System Info (please complete the following information):