-
Notifications
You must be signed in to change notification settings - Fork 7
Description
I am attempting to run two Gradle tasks on the same command line, using the following command:
./gradlew releaseVersion build
However, when executing the releaseVersion and build tasks together, I noticed that the build version does not reflect the version of the tag/commit generated by the releaseVersion task. I suspect this might be related to Gradle's lifecycle, where configuration tasks are executed only once. It seems the plugin calculates the version and assigns it to a lazy property.
I executed Gradle without parallel mode enabled and also tried applying the mustRunAfter configuration on the build task, specifying that it should run after releaseVersion.
Is this behavior expected? Shouldn't there be an update to the version property after the releaseVersion task execution?
I managed to synchronize the build version with what would be generated after the version tag/commit by including the parameter -PdefaultPreRelease=