Intuitive task() syntax for referring to a task from another project

(Mike Meessen) #1

Hi everyone,

As discussed in this topic (1), it would be nice if the ‘task()’ method would return a task when referenced like this in a multi-project build:


That would allow us to write:

  copy {

from { task(’:otherProject:createStuff’) }

into stuffDir }

… instead of the longer and more cumbersome …

  copy {

from { project(':otherProject').createStuff }

into stuffDir  }  

What are your thoughts? Would that be possible API-wise?

Best regards, Mike

– (1)

(Luke Daley) #2

I like this idea. +1 from me.

(Peter Niederwieser) #3

Questions that come to mind are:

  • How often is this needed? * Do we want to encourage this? (In general, we want to move away from one project reaching out into another.)