Introduce configurations for configuring the classpath #138
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously to this commit, the classpath used by native image was
hardcoded to include the project artifact and its runtime classpath.
With this change, the plugin now introduces a couple of configurations:
nativeImageCompileOnly
which can be used to declare dependencies(or artifacts) which are required at image build time, but not by the
main application (JVM mode)
nativeImageClasspath
, which extends from the same configurationsas the
runtimeClasspath
configuration, but also from the newnativeImageCompileOnly
configuration. This is the configuration whichis now used to configure the plugin classpath.
This will allow other plugins to contribute more artifacts or dependencies
at image build time without having to tweak manually the image classpath,
which could before imply loosing some user configuration code.
This also makes it cleaner to contribute GraalVM native image features,
without leaking into the main application runtime classpath.
Eventually, the same mirror configurations are defines for the test
image building.
Closes #129