Debugging file copy task

Hi

im trying to see which part of my build is copying a particular file to a location. I suspect it is happening as part of java plugin processResources.

with standard logging there is no output with gradle -i , it logs a few files, then I get

132 more …

and with gradle -d, I dont see the list of files in the output.

What is the best way to see the files copied ?

1 Like

You can use Copy.eachFile to inspect which files are being copied. For example:

tasks.withType(Copy) {
    eachFile { println it.file }
}
1 Like