org.gradle.api.tasks.bundling

## Class AbstractArchiveTask

- java.lang.Object
- - org.gradle.api.internal.AbstractTask
  - - org.gradle.api.DefaultTask
    - - org.gradle.api.internal.ConventionTask
      - - org.gradle.api.tasks.AbstractCopyTask
        - - org.gradle.api.tasks.bundling.AbstractArchiveTask

- All Implemented Interfaces:
    Comparable<Task>, ContentFilterable, CopyProcessingSpec, CopySourceSpec, CopySpec, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.file.copy.CopySpecSource, org.gradle.api.internal.IConventionAware, org.gradle.api.internal.TaskInternal, ExtensionAware, Task, PatternFilterable, org.gradle.util.Configurable<Task>
  Direct Known Subclasses:
    Tar, Zip

      public abstract class AbstractArchiveTask
      extends AbstractCopyTask

  `AbstractArchiveTask` is the base class for all archive tasks.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.gradle.api.Task

      `Task.Namer`

  - ### Field Summary

    - ### Fields inherited from interface org.gradle.api.Task

      `TASK_ACTION, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractArchiveTask()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getAppendix()` Returns the appendix part of the archive name, if any.
    `String` | `getArchiveName()` Returns the archive name.
    `File` | `getArchivePath()` The path where the archive is constructed.
    `String` | `getBaseName()` Returns the base name of the archive.
    `String` | `getClassifier()` Returns the classifier part of the archive name, if any.
    `File` | `getDestinationDir()` Returns the directory where the archive is generated into.
    `String` | `getExtension()` Returns the extension part of the archive name.
    `String` | `getVersion()` Returns the version part of the archive name, if any.
    `AbstractArchiveTask` | `into(Object destPath)` Specifies the destination directory *inside* the archive for the files.
    `CopySpec` | `into(Object destPath, Action<? super CopySpec> copySpec)` Creates and configures a child `CopySpec` with a destination directory *inside* the archive for the files.
    `AbstractArchiveTask` | `into(Object destPath, Closure configureClosure)` Creates and configures a child `CopySpec` with a destination directory *inside* the archive for the files.
    `void` | `setAppendix(String appendix)`
    `void` | `setArchiveName(String name)` Sets the archive name.
    `void` | `setBaseName(String baseName)`
    `void` | `setClassifier(String classifier)`
    `void` | `setDestinationDir(File destinationDir)`
    `void` | `setExtension(String extension)`
    `void` | `setVersion(String version)`

    - ### Methods inherited from class org.gradle.api.tasks.AbstractCopyTask

      `copy, createCopyAction, createRootSpec, eachFile, eachFile, exclude, exclude, exclude, exclude, expand, filesMatching, filesMatching, filesNotMatching, filesNotMatching, filter, filter, filter, filter, from, from, from, getDirMode, getDuplicatesStrategy, getExcludes, getFileLookup, getFileMode, getFileResolver, getFileSystem, getFilteringCharset, getIncludeEmptyDirs, getIncludes, getInstantiator, getMainSpec, getRootSpec, getSource, include, include, include, include, isCaseSensitive, rename, rename, rename, rename, setCaseSensitive, setDirMode, setDuplicatesStrategy, setExcludes, setFileMode, setFilteringCharset, setIncludeEmptyDirs, setIncludes, with`

    - ### Methods inherited from class org.gradle.api.internal.ConventionTask

      `conventionMapping, conventionMapping, getConventionMapping`

    - ### Methods inherited from class org.gradle.api.internal.AbstractTask

      `addValidator, appendParallelSafeAction, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doLast, doLast, execute, finalizedBy, getActionClassLoaders, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getImpliesSubProjects, getInputs, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, injectIntoNewInstance, isEnabled, isHasCustomActions, leftShift, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractArchiveTask

          public AbstractArchiveTask()

  - ### Method Detail

    - #### getArchiveName

          @Internal(value="Represented as part of archivePath")
          public String getArchiveName()

      Returns the archive name. If the name has not been explicitly set, the pattern for the name is: `[baseName]-[appendix]-[version]-[classifier].[extension]`
      Returns:
        the archive name.

    - #### setArchiveName

          public void setArchiveName(String name)

      Sets the archive name.
      Parameters:
        `name` - the archive name.

    - #### getArchivePath

          @OutputFile
          public File getArchivePath()

      The path where the archive is constructed. The path is simply the `destinationDir` plus the `archiveName`.
      Returns:
        a File object with the path to the archive

    - #### getDestinationDir

          @Internal(value="Represented as part of archivePath")
          public File getDestinationDir()

      Returns the directory where the archive is generated into.
      Returns:
        the directory

    - #### setDestinationDir

          public void setDestinationDir(File destinationDir)

    - #### getBaseName

          @Internal(value="Represented as part of archiveName")
          public String getBaseName()

      Returns the base name of the archive.
      Returns:
        the base name.

    - #### setBaseName

          public void setBaseName(String baseName)

    - #### getAppendix

          @Internal(value="Represented as part of archiveName")
          public String getAppendix()

      Returns the appendix part of the archive name, if any.
      Returns:
        the appendix. May be null

    - #### setAppendix

          public void setAppendix(String appendix)

    - #### getVersion

          @Internal(value="Represented as part of archiveName")
          public String getVersion()

      Returns the version part of the archive name, if any.
      Returns:
        the version. May be null.

    - #### setVersion

          public void setVersion(String version)

    - #### getExtension

          @Internal(value="Represented as part of archiveName")
          public String getExtension()

      Returns the extension part of the archive name.

    - #### setExtension

          public void setExtension(String extension)

    - #### getClassifier

          @Internal(value="Represented as part of archiveName")
          public String getClassifier()

      Returns the classifier part of the archive name, if any.
      Returns:
        The classifier. May be null.

    - #### setClassifier

          public void setClassifier(String classifier)

    - #### into

          public AbstractArchiveTask into(Object destPath)

      Specifies the destination directory *inside* the archive for the files. The destination is evaluated as per `Project.file(Object)`. Don't mix it up with `getDestinationDir()` which specifies the output directory for the archive.
      Specified by:
        `into` in interface `CopyProcessingSpec`
      Specified by:
        `into` in interface `CopySpec`
      Overrides:
        `into` in class `AbstractCopyTask`
      Parameters:
        `destPath` - destination directory *inside* the archive for the files
      Returns:
        this

    - #### into

          public AbstractArchiveTask into(Object destPath,
                                 Closure configureClosure)

      Creates and configures a child `CopySpec` with a destination directory *inside* the archive for the files. The destination is evaluated as per `Project.file(Object)`. Don't mix it up with `getDestinationDir()` which specifies the output directory for the archive.
      Specified by:
        `into` in interface `CopySpec`
      Overrides:
        `into` in class `AbstractCopyTask`
      Parameters:
        `destPath` - destination directory *inside* the archive for the files
        `configureClosure` - The closure to use to configure the child `CopySpec`.
      Returns:
        this

    - #### into

          public CopySpec into(Object destPath,
                      Action<? super CopySpec> copySpec)

      Creates and configures a child `CopySpec` with a destination directory *inside* the archive for the files. The destination is evaluated as per `Project.file(Object)`. Don't mix it up with `getDestinationDir()` which specifies the output directory for the archive.
      Specified by:
        `into` in interface `CopySpec`
      Overrides:
        `into` in class `AbstractCopyTask`
      Parameters:
        `destPath` - destination directory *inside* the archive for the files
        `copySpec` - The closure to use to configure the child `CopySpec`.
      Returns:
        this