Klasse 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
Alle implementierten Schnittstellen:
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, Named, ExtensionAware, Task, PatternFilterable, Configurable<Task>
Bekannte direkte Unterklassen:
Tar, Zip

@DisableCachingByDefault(because="Abstract super-class, not to be instantiated directly") public abstract class AbstractArchiveTask extends AbstractCopyTask
AbstractArchiveTask is the base class for all archive tasks.
  • Konstruktordetails

    • AbstractArchiveTask

      public AbstractArchiveTask()
  • Methodendetails

    • getArchiveFileName

      @Internal("Represented as part of archiveFile") public Property<String> getArchiveFileName()
      Returns the archive name. If the name has not been explicitly set, the pattern for the name is: [archiveBaseName]-[archiveAppendix]-[archiveVersion]-[archiveClassifier].[archiveExtension]
      Gibt zurück:
      the archive name.
      Seit:
      5.1
    • getArchiveFile

      @OutputFile public Provider<RegularFile> getArchiveFile()
      The RegularFile where the archive is constructed. The path is simply the destinationDirectory plus the archiveFileName.
      Gibt zurück:
      a RegularFile object with the path to the archive
      Seit:
      5.1
    • getDestinationDirectory

      @Internal("Represented by the archiveFile") public DirectoryProperty getDestinationDirectory()
      The directory where the archive will be placed.
      Seit:
      5.1
    • getArchivePath

      @Deprecated @ReplacedBy("archiveFile") public File getArchivePath()
      Veraltet.
      The path where the archive is constructed. The path is simply the destinationDirectory plus the archiveFileName.
      Gibt zurück:
      a File object with the path to the archive
    • getArchiveBaseName

      @Internal("Represented as part of archiveFile") public Property<String> getArchiveBaseName()
      Returns the base name of the archive.
      Gibt zurück:
      the base name. Internal property may be null.
      Seit:
      5.1
    • getArchiveAppendix

      @Internal("Represented as part of archiveFile") public Property<String> getArchiveAppendix()
      Returns the appendix part of the archive name, if any.
      Gibt zurück:
      the appendix. May be null
      Seit:
      5.1
    • getArchiveVersion

      @Internal("Represented as part of archiveFile") public Property<String> getArchiveVersion()
      Returns the version part of the archive name.
      Gibt zurück:
      the version. Internal property may be null.
      Seit:
      5.1
    • getArchiveExtension

      @Internal("Represented as part of archiveFile") public Property<String> getArchiveExtension()
      Returns the extension part of the archive name.
      Seit:
      5.1
    • getArchiveClassifier

      @Internal("Represented as part of archiveFile") public Property<String> getArchiveClassifier()
      Returns the classifier part of the archive name, if any.
      Gibt zurück:
      The classifier. Internal property may be null.
      Seit:
      5.1
    • 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 getDestinationDirectory() which specifies the output directory for the archive.
      Angegeben von:
      into in Schnittstelle CopyProcessingSpec
      Angegeben von:
      into in Schnittstelle CopySpec
      Setzt außer Kraft:
      into in Klasse AbstractCopyTask
      Parameter:
      destPath - destination directory *inside* the archive for the files
      Gibt zurück:
      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 getDestinationDirectory() which specifies the output directory for the archive.
      Angegeben von:
      into in Schnittstelle CopySpec
      Setzt außer Kraft:
      into in Klasse AbstractCopyTask
      Parameter:
      destPath - destination directory *inside* the archive for the files
      configureClosure - The closure to use to configure the child CopySpec.
      Gibt zurück:
      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 getDestinationDirectory() which specifies the output directory for the archive.
      Angegeben von:
      into in Schnittstelle CopySpec
      Setzt außer Kraft:
      into in Klasse AbstractCopyTask
      Parameter:
      destPath - destination directory *inside* the archive for the files
      copySpec - The closure to use to configure the child CopySpec.
      Gibt zurück:
      this
    • isPreserveFileTimestamps

      @Input public boolean 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.

      Gibt zurück:
      true if file timestamps should be preserved for archive entries
      Seit:
      3.4
    • setPreserveFileTimestamps

      public void setPreserveFileTimestamps(boolean preserveFileTimestamps)
      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.

      Parameter:
      preserveFileTimestamps - true if file timestamps should be preserved for archive entries
      Seit:
      3.4
    • isReproducibleFileOrder

      @Input public boolean 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.

      Gibt zurück:
      true if the files should read from disk in a reproducible order.
      Seit:
      3.4
    • setReproducibleFileOrder

      public void setReproducibleFileOrder(boolean reproducibleFileOrder)
      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.

      Parameter:
      reproducibleFileOrder - true if the files should read from disk in a reproducible order.
      Seit:
      3.4
    • createCopyActionExecuter

      protected org.gradle.api.internal.file.copy.CopyActionExecuter createCopyActionExecuter()
      Setzt außer Kraft:
      createCopyActionExecuter in Klasse AbstractCopyTask