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>
AbstractArchiveTask is the base class for all archive tasks.-
Nested Class Summary
Nested classes/interfaces inherited from interface Task
Task.Namer -
Field Summary
Fields inherited from interface Task
TASK_ACTION, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.gradle.api.internal.file.copy.CopyActionExecuterReturns the appendix part of the archive name, if any.Returns the archive name.The path where the archive is constructed.Returns the base name of the archive.Returns the classifier part of the archive name, if any.Returns the directory where the archive is generated into.Returns the extension part of the archive name.Returns the version part of the archive name, if any.Specifies the destination directory *inside* the archive for the files.Creates and configures a childCopySpecwith a destination directory *inside* the archive for the files.Creates and configures a childCopySpecwith a destination directory *inside* the archive for the files.booleanSpecifies whether file timestamps should be preserved in the archive.booleanSpecifies whether to enforce a reproducible file order when reading files from directories.voidsetAppendix(String appendix) voidsetArchiveName(String name) Sets the archive name.voidsetBaseName(String baseName) voidsetClassifier(String classifier) voidsetDestinationDir(File destinationDir) voidsetExtension(String extension) voidsetPreserveFileTimestamps(boolean preserveFileTimestamps) Specifies whether file timestamps should be preserved in the archive.voidsetReproducibleFileOrder(boolean reproducibleFileOrder) Specifies whether to enforce a reproducible file order when reading files from directories.voidsetVersion(String version) Methods inherited from class AbstractCopyTask
copy, createCopyAction, createRootSpec, eachFile, eachFile, exclude, exclude, exclude, exclude, expand, filesMatching, filesMatching, filesNotMatching, filesNotMatching, filter, filter, filter, filter, from, from, from, getDirectoryFileTreeFactory, 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, withMethods inherited from class org.gradle.api.internal.ConventionTask
conventionMapping, conventionMapping, getConventionMappingMethods inherited from class DefaultTask
newInputDirectory, newInputFile, newOutputDirectory, newOutputFileMethods inherited from class org.gradle.api.internal.AbstractTask
addValidator, appendParallelSafeAction, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doFirst, doLast, doLast, doLast, execute, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLocalState, 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
-
Constructor Details
-
AbstractArchiveTask
public AbstractArchiveTask()
-
-
Method Details
-
getArchiveName
-
setArchiveName
-
getArchivePath
The path where the archive is constructed. The path is simply thedestinationDirplus thearchiveName.- Returns:
- a File object with the path to the archive
-
getDestinationDir
-
setDestinationDir
-
getBaseName
-
setBaseName
-
getAppendix
-
setAppendix
-
getVersion
-
setVersion
-
getExtension
-
setExtension
-
getClassifier
-
setClassifier
-
into
Specifies the destination directory *inside* the archive for the files. The destination is evaluated as perProject.file(Object). Don't mix it up withgetDestinationDir()which specifies the output directory for the archive.- Specified by:
intoin interfaceCopyProcessingSpec- Specified by:
intoin interfaceCopySpec- Overrides:
intoin classAbstractCopyTask- Parameters:
destPath- destination directory *inside* the archive for the files- Returns:
- this
-
into
Creates and configures a childCopySpecwith a destination directory *inside* the archive for the files. The destination is evaluated as perProject.file(Object). Don't mix it up withgetDestinationDir()which specifies the output directory for the archive.- Specified by:
intoin interfaceCopySpec- Overrides:
intoin classAbstractCopyTask- Parameters:
destPath- destination directory *inside* the archive for the filesconfigureClosure- The closure to use to configure the childCopySpec.- Returns:
- this
-
into
Creates and configures a childCopySpecwith a destination directory *inside* the archive for the files. The destination is evaluated as perProject.file(Object). Don't mix it up withgetDestinationDir()which specifies the output directory for the archive.- Specified by:
intoin interfaceCopySpec- Overrides:
intoin classAbstractCopyTask- Parameters:
destPath- destination directory *inside* the archive for the filescopySpec- The closure to use to configure the childCopySpec.- Returns:
- this
-
isPreserveFileTimestamps
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.
- Returns:
- true if file timestamps should be preserved for archive entries
- Since:
- 3.4
-
setPreserveFileTimestamps
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.
- Parameters:
preserveFileTimestamps- true if file timestamps should be preserved for archive entries- Since:
- 3.4
-
isReproducibleFileOrder
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.
- Returns:
- true if the files should read from disk in a reproducible order.
- Since:
- 3.4
-
setReproducibleFileOrder
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.
- Parameters:
reproducibleFileOrder- true if the files should read from disk in a reproducible order.- Since:
- 3.4
-
createCopyActionExecuter
protected org.gradle.api.internal.file.copy.CopyActionExecuter createCopyActionExecuter()- Overrides:
createCopyActionExecuterin classAbstractCopyTask
-