I have an exec task that outputs various files to a directory. Setting the outputs property to that directory leads to correct up-to-date determination, i.e. when files that aren’t generated by the exec process are deleted the task is still up to date but when binaries that are created from the exec process are deleted it determines the task is not up to date. Seeing this I can tell that gradle knows in some way what files are being produced by the exec process. Its hard to determine what all files this exec will output so I would like access to that info as well so i can then publish those binaries. When I do task.outputs.files I just see the directory. Is there anyway to view something that would allow me to know what particular files were put in the output directory?
Assuming no other task also creates output in that same directory (and best practice says you shouldn’t) you can convert the ‘FileCollection’ to a ‘FileTree’ to get the child items.