I am trying to copy one file to multiple destinations through a Gradle task. I found the following in other websites but I get an ERROR while running this task.
If you really want them in one task, you do something like this:
def filesToCopy = copySpec { from 'someFile.jar' rename { 'anotherfile.jar' } } task copyFiles << { ['dest1', 'dest2'].each { dest -> copy { with filesToCopy into dest } } }