What I try to achieve:
After the end of the build, I’d like to get the current Gradle start parameters.
Current behavior
After running a build that has a configuration cache with new parameters, the parameters from the previous run are returned from gradle.startParameter.<parameter>
.
Expected behavior
Each build, gradle.startParameter
returns up-to-date parameters.
Here’s reproduction (please check PluginTest
): GitHub - wzieba/GetGradleConfigurationInPluginRepro . In this reproduction, I also experimented with FlowAction
API, but unsuccessfully.
What’s also interesting, gradle.startParameter.taskNames
seems to always be up-to-date
Probably related GitHub issue: Provide access to Gradle.StartParameter property value in a configuration cache compliant way · Issue #19474 · gradle/gradle · GitHub
My questions is:
Is it possible to somehow achieve my goal, which is to get the up to date Gradle start parameters with a build that uses configuration cache?