I understand that when we are writing the following,
task newCopyTask(type: Copy){
from 'image' // this line in question
include '*.gif'
into 'build'
}
I am calling the AbstractCopyTask from(Object... sourcePaths)
method on Copy Task object on 2nd line.
But in case of the following,
task newCopyTask(type: Copy){
from('image'){ // this line in question
include '*.gif'
into 'gif'
}
into 'build'
}
Am I calling this method AbstractCopyTask from(Object sourcePath, Closure c)
?
If that is so, I do not understand how my arguments are lining up? Closure c is the 2nd argument, but it’s outside of parenthesis.