Hey,

I'm assuming you're applying the plugin on multiple projects but you
want to create some task only on a root project? The easiest could be
checking if the plugin is being applied to root project and add the
task in such case. Something like:

apply(Project p) {
  if (p.parent == null) {
    //create task only on root
  }

Is this what you are after?
Cheers!

On Wed, Jul 13, 2011 at 5:05 PM, phil swenson <phil.swen...@gmail.com> wrote:
> I want to have one global task for a project and all sub projects by
> including a plugin in at my root project.  This is for launching an
> external process....
>
> I haven't been able to get this to work so I ended up with code like this:
>
> Task launchTask =
> project.rootProject.tasks.replace(LAUNCH_MESSAGE_EDITOR_TASK_NAME) <<
> {
>
> This doesn't seem ideal as "replace" is called many times.... what is
> the proper technique for this?
>
> Thanks!
> phil
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



-- 
Szczepan Faber
Principal engineer@gradleware
Lead@mockito

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to