UserData and GradleApplicationEnvironmentProvider

My question is similar to the one asked at

I'm currently trying to figure out how to modify the EnvFile plugin to work for Application Configurations when using Gradle delegated build actions.

The EnvFile plugin works by setting the user data of a run configuration in an editor, and then reading that user data when the configuration is run (using the runConfigurationExtension point). For a quick look at the implementation, take a peek at

Now when the run action is delegated to Gradle, the User Data set by the UI on the ApplicationConfiguration object is not copied over to the GradleRunConfiguration. As such, the runConfigurationExtension thinks the plugin is not configured on the config and will do nothing.

I have already tried using copyable user data instead of normal user data, but that is not copied over either.
I also tried writing an executionEnvironmentProvider, but any user data I set will be overwritten by the ExecutionEnvironmentBuilder#copyUserDataTo.

Is there any way to use user data set in ApplicationConfiguration when using delegated runs? Any help would be appreciated!

Please sign in to leave a comment.