api / org.gradle.api / Project / zipTree

zipTree

abstract fun zipTree(zipPath: Any): FileTree

Creates a new FileTree which contains the contents of the given ZIP file. The given zipPath path is evaluated as per #file(Object). You can combine this method with the #copy(groovy.lang.Closure) method to unzip a ZIP file.

The returned file tree is lazy, so that it scans for files only when the contents of the file tree are queried. The file tree is also live, so that it scans for files each time the contents of the file tree are queried.

Parameters

zipPath - The ZIP file. Evaluated as per #file(Object).

Return
the file tree. Never returns null.