Hi,

I just added a release plugin to gradle-git (
https://github.com/ajoberstar/gradle-git), the main functionality of which
is to infer the project's version based on the tags in a Git repository and
a little user input in the form of executing a task specifying the type of
change (the lack of executing one of those tasks is the alternative input).

The short version is that, when using this plugin, the project version
isn't collapsed to a usable value until (at the earliest) the time the task
graph is ready. It will throw IllegalStateExceptions until that time.

However, the MavenPublish plugin looks for the String value of the version
right after project evaluation, see the line linked below.

https://github.com/gradle/gradle/blob/master/subprojects/maven/src/main/groovy/org/gradle/api/publish/maven/plugins/MavenPublishPlugin.java#L100

Is there any reason it needs to get the collapsed value that "early" on?
Could it wait until execution of the publish task(s)?

I'd appreciate any insights you have, and I'm willing to help out with any
changes. Thanks!


Andrew Oberstar

Reply via email to