How to load and read files in Gradle Project. The Gradle Project Api has the following methods for using files. file() - to load and read a particular file files() - to load and read multiple files fileTree() - to load and read file hierarchy in a directory or folder zipTree() - to load and read a zip file (includes Jar , War and Ear files) tarTree() - to load and read a tar file How to list files inside a Zip file Jar File and Tar file Lets say we have a file structure as shown in image below. Following Gradle task will list the files inside a zip file, jar file and a tar file at the location "src/main/resources/archives/" task showFiles(){ doLast{ FileTree zipFiles = zipTree("src/main/resources/archives/resources.zip"); FileTree jarFiles = zipTree("src/main/resources/archives/resources.jar"); FileTree tarFiles = tarTree("src/main/resources/archives/resources.tar.gz"); println " \n#Contents of Zip ...