open class Zip : AbstractArchiveTask
Assembles a ZIP archive. The default is to compress the contents of the zip.
Zip() |
static val ZIP_EXTENSION: String |
open fun getEntryCompression(): ZipEntryCompression
Returns the compression level of the entries of the archive. If set to |
|
open fun getMetadataCharset(): String
The character set used to encode ZIP metadata like file names. Defaults to the platform's default character set. |
|
open fun isZip64(): Boolean
Whether the zip can contain more than 65535 files and/or support files greater than 4GB in size. The standard zip format has hard limits on file size and count. The Zip64 format extension practically removes these limits and is therefore required for building large zips. However, not all Zip readers support the Zip64 extensions. Notably, the java.util.zip.ZipInputStream JDK class does not support Zip64 for versions earlier than Java 7. This means you should not enable this property if you are building JARs to be used with Java 6 and earlier runtimes. |
|
open fun setEntryCompression(entryCompression: ZipEntryCompression): Unit
Sets the compression level of the entries of the archive. If set to |
|
open fun setMetadataCharset(metadataCharset: String): Unit
The character set used to encode ZIP metadata like file names. Defaults to the platform's default character set. |
|
open fun setZip64(allowZip64: Boolean): Unit
Enables building zips with more than 65535 files or bigger than 4GB. |
open fun getAppendix(): String
Returns the appendix part of the archive name, if any. |
|
open fun getArchiveName(): String
Returns the archive name. If the name has not been explicitly set, the pattern for the name is: |
|
open fun getArchivePath(): File
The path where the archive is constructed. The path is simply the |
|
open fun getBaseName(): String
Returns the base name of the archive. |
|
open fun getClassifier(): String
Returns the classifier part of the archive name, if any. |
|
open fun getDestinationDir(): File
Returns the directory where the archive is generated into. |
|
open fun getExtension(): String
Returns the extension part of the archive name. |
|
open fun getVersion(): String
Returns the version part of the archive name, if any. |
|
open fun into(destPath: Any): AbstractArchiveTask
Specifies the destination directory *inside* the archive for the files. The destination is evaluated as per open fun into(destPath: Any, configureClosure: Closure<Any>): AbstractArchiveTask open fun into(destPath: Any, copySpec: Action<in CopySpec>): CopySpec
Creates and configures a child |
|
open fun isPreserveFileTimestamps(): Boolean
Specifies whether file timestamps should be preserved in the archive. If false this ensures that archive entries have the same time for builds between different machines, Java versions and operating systems. |
|
open fun isReproducibleFileOrder(): Boolean
Specifies whether to enforce a reproducible file order when reading files from directories. Gradle will then walk the directories on disk which are part of this archive in a reproducible order independent of file systems and operating systems. This helps Gradle reliably produce byte-for-byte reproducible archives. |
|
open fun setAppendix(appendix: String): Unit |
|
open fun setArchiveName(name: String): Unit
Sets the archive name. |
|
open fun setBaseName(baseName: String): Unit |
|
open fun setClassifier(classifier: String): Unit |
|
open fun setDestinationDir(destinationDir: File): Unit |
|
open fun setExtension(extension: String): Unit |
|
open fun setPreserveFileTimestamps(preserveFileTimestamps: Boolean): Unit
Specifies whether file timestamps should be preserved in the archive. If false this ensures that archive entries have the same time for builds between different machines, Java versions and operating systems. |
|
open fun setReproducibleFileOrder(reproducibleFileOrder: Boolean): Unit
Specifies whether to enforce a reproducible file order when reading files from directories. Gradle will then walk the directories on disk which are part of this archive in a reproducible order independent of file systems and operating systems. This helps Gradle reliably produce byte-for-byte reproducible archives. |
|
open fun setVersion(version: String): Unit |
open class Jar : Zip
Assembles a JAR archive. |