This is indeed a bug in Gradle, in the delegate of ‘sync’ task. As you may have noticed, ‘copy’ task still works. Workaround for your issue:
import org.gradle.api.internal.ClosureBackedAction
task ttt << {
sync new ClosureBackedAction({
from ‘d:/–/1’
from ‘d:/–/2’
})
}
Or you could define a helper method in your project:
import org.gradle.api.internal.ClosureBackedAction
def sync(Closure closure) {
sync(new ClosureBackedAction(closure))
}
and then use ‘sync’ as usual