netmikey
(Mike Meessen)
August 21, 2012, 10:11am
1
Is there a shorter way to refer to a task of another project in a multi-project build than "project(’…’).tasks.getByName(’…’)?
In project “myProject”:
copy {
from { project(’:otherProject’).tasks.getByName(‘createStuff’) }
into stuffDir }
The full task path notation like in the doc:
task taskX(dependsOn: ‘:projectB:taskY’)
Doesn’t work in the copySpec (no error, the task’s output just isn’t taken):
copy {
from { task(’:otherProject:createStuff’) }
into stuffDir }
Best regards, Mike
luke_daley
(Luke Daley)
August 21, 2012, 10:45am
2
‘project(’:otherProject’).createStuff’
netmikey
(Mike Meessen)
August 21, 2012, 10:59am
3
Thanks, as always, for the quick reply Luke
Any chance ‘task(’:otherProject:createStuff’)’ could return the task someday? That syntax would feel the most intuitive…
luke_daley
(Luke Daley)
August 21, 2012, 11:31am
4
I actually quite like the idea. Best thing to do would be to raise a new “idea” topic focussed on adding this syntax. We can then see what the community thinks.
netmikey
(Mike Meessen)
August 21, 2012, 11:47am
5