9

Is it possible with println inside the method copy to print all file names to the console. Or is there another option to print the copied files?

copy {
  from "${source}"
  into "${target}"
  include "foo"
  include "xyz"
  println ???
}
Horcrux7
  • 23,758
  • 21
  • 98
  • 156

1 Answers1

21

Maybe try:

copy {
   from "${source}"
   into "${target}"
   include "foo"
   include "xyz"
   eachFile { println it.name }
}
Opal
  • 81,889
  • 28
  • 189
  • 210