Thanks Peter, but doesn't this imply that the rootProject applies the
plugin?
Which is not my case, I only apply it on subprojects.
The root only serves as a container of multiple subprojects that use the
plugin.
And I have many roots with varying number of subprojects.

Maybe by adding the task to the root project in the subprojects could be
used more efficiently,
for example by adding it as a high level task dependency?
But I would expect to hit some problems with multiple calls to task creation
on the same (root)project.

regards
gretar



On Mon, Feb 14, 2011 at 11:47 AM, Peter Niederwieser <[email protected]>wrote:

>
> Why not simply:
>
> if (target == target.rootProject) {
>  target.versionStamp = ...
>  println "Nexus build plugin version $target.versionStamp"
> }
>
> Haven't tried this, but can't see anything wrong with it.
>
> --
> Peter Niederwieser
> Developer, Gradle
> http://www.gradle.org
> Trainer & Consultant, Gradle Inc.
> http://www.gradle.biz
> Creator, Spock Framework
> http://spockframework.org
>
>
>
> --
> View this message in context:
> http://gradle.1045684.n5.nabble.com/plugin-initialization-in-a-multiproject-build-tp3384288p3384329.html
> Sent from the gradle-user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

Reply via email to