Horcrux7
Horcrux7

Reputation: 24477

How to log the files of the gradle copy method?

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 ???
}

Upvotes: 10

Views: 3643

Answers (1)

Opal
Opal

Reputation: 84864

Maybe try:

copy {
   from "${source}"
   into "${target}"
   include "foo"
   include "xyz"
   eachFile { println it.name }
}

Upvotes: 22

Related Questions