Groovy Documentation

org.gradle.api.tasks.bundling
[Groovy] Class Jar

java.lang.Object
  org.gradle.api.internal.ConventionTask
      org.gradle.api.tasks.AbstractCopyTask
          org.gradle.api.tasks.bundling.AbstractArchiveTask
              org.gradle.api.tasks.bundling.Zip
                  org.gradle.api.tasks.bundling.Jar

class Jar
extends Zip

Assembles a JAR archive.

Authors:
Hans Dockter


Field Summary
static String DEFAULT_EXTENSION

 
Fields inherited from class Zip
ZIP_EXTENSION
 
Constructor Summary
Jar()

 
Method Summary
Manifest getManifest()

Returns the manifest for this JAR archive.

CopySpec getMetaInf()

Jar manifest(Closure configureClosure)

Configures the manifest for this JAR archive.

CopySpec metaInf(Closure configureClosure)

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

void setManifest(Manifest manifest)

Sets the manifest for this JAR archive.

 
Methods inherited from class Zip
getCopyAction
 
Methods inherited from class AbstractArchiveTask
getAppendix, getArchiveName, getArchivePath, getBaseName, getClassifier, getDestinationDir, getExtension, getVersion, into, into, setAppendix, setArchiveName, setBaseName, setClassifier, setDestinationDir, setExtension, setVersion
 
Methods inherited from class AbstractCopyTask
configureRootSpec, copy, eachFile, eachFile, exclude, exclude, exclude, exclude, expand, filter, filter, filter, from, from, getCopyAction, getDefaultSource, getDirMode, getExcludes, getFileMode, getIncludeEmptyDirs, getIncludes, getMainSpec, getRootSpec, getSource, include, include, include, include, into, into, isCaseSensitive, rename, rename, rename, setCaseSensitive, setDirMode, setExcludes, setFileMode, setIncludeEmptyDirs, setIncludes, with
 

Field Detail

DEFAULT_EXTENSION

public static final String DEFAULT_EXTENSION


 
Constructor Detail

Jar

Jar()


 
Method Detail

getManifest

Manifest getManifest()
Returns the manifest for this JAR archive.
Returns:
The manifest


getMetaInf

CopySpec getMetaInf()


manifest

Jar manifest(Closure configureClosure)
Configures the manifest for this JAR archive.

The given closure is executed to configure the manifest. The Manifest is passed to the closure as its delegate.

Parameters:
configureClosure - The closure.
Returns:
This.


metaInf

CopySpec metaInf(Closure configureClosure)
Adds content to this JAR archive's META-INF directory.

The given closure is executed to configure a CopySpec. The CopySpec is passed to the closure as its delegate.

Parameters:
configureClosure - The closure.
Returns:
The created CopySpec


setManifest

void setManifest(Manifest manifest)
Sets the manifest for this JAR archive.
Parameters:
manifest - The manifest. May be null.


 

Gradle API 1.0