- Notifications
You must be signed in to change notification settings - Fork 79
Description
Is your feature request related to a problem? Please describe.
I'm building a plugin that allows to package applications in different formats, such as fatjar, docker, native etc.
In the previous version of the graalvm plugin (0.9.11) I could set agent.enabled.set(true) and then run nativeCompile to run an application and produce configuration files.
In the latest version of the plugin (0.9.12) the only way to attach an agent is to provide an agent property to Gradle. It can't be done programmatically in the configuration phase.
Describe the solution you'd like
Please, allow attaching the agent in the configuration phase so that it's possible for other plugins to use the GraalVM gradle plugin to build those configuration files.
I want to execute tasks in this order:
configureGraalVM(custom task, attaches an agent in configuration phase)run(with an agent and produce configuration files)runWithAgent(custom task which is invoked by the end user, does nothing and only calls configureGraalVM and run).
Describe alternatives you've considered
I can try achieving this behavior by replacing run task with a custom invocation of ./gradlew -Pagent run on JavaExec object inside some task, but it'd be so ugly.