Debugging file copy task


(batwanger69) #1

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 ?


(Peter Niederwieser) #2

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

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