api / org.gradle.api.tasks.bundling / Jar

Jar

open class Jar : Jar

Assembles a JAR archive.

Constructors

<init>

Jar()

Assembles a JAR archive.

Inherited Properties

DEFAULT_EXTENSION

static val DEFAULT_EXTENSION: String

Functions

manifest

open fun manifest(configureClosure: Closure<*>): Jar

Inherited Functions

getManifest

open fun getManifest(): Manifest

Returns the manifest for this JAR archive.

getManifestContentCharset

open fun getManifestContentCharset(): String

The character set used to encode the manifest content. Defaults to UTF-8. You can change this property but it is not recommended as JVMs expect manifests content to be encoded using UTF-8.

getMetaInf

open fun getMetaInf(): CopySpec

getMetadataCharset

open fun getMetadataCharset(): String

The character set used to encode JAR metadata like file names. Defaults to UTF-8. You can change this property but it is not recommended as JVMs expect JAR metadata to be encoded using UTF-8

manifest

open fun manifest(configureAction: Action<in Manifest>): Jar

Configures the manifest for this JAR archive.

The given action is executed to configure the manifest.

metaInf

open fun metaInf(configureClosure: Closure<*>): CopySpec

Adds content to this JAR archive's META-INF directory.

The given closure is executed to configure a CopySpec. The org.gradle.api.file.CopySpec is passed to the closure as its delegate.

open fun metaInf(configureAction: Action<in CopySpec>): CopySpec

Adds content to this JAR archive's META-INF directory.

The given action is executed to configure a CopySpec.

setManifest

open fun setManifest(manifest: Manifest): Unit

Sets the manifest for this JAR archive.

setManifestContentCharset

open fun setManifestContentCharset(manifestContentCharset: String): Unit

The character set used to encode the manifest content.

setMetadataCharset

open fun setMetadataCharset(metadataCharset: String): Unit

The character set used to encode JAR metadata like file names. Defaults to UTF-8. You can change this property but it is not recommended as JVMs expect JAR metadata to be encoded using UTF-8

Inheritors

Ear

open class Ear : Jar

Assembles an EAR archive.

War

open class War : Jar

Assembles a WAR archive.