Klasse Jar

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:
Jar

@DisableCachingByDefault(because="Not worth caching") public abstract class Jar extends Zip
Assembles a JAR archive.
  • Felddetails

  • Konstruktordetails

    • Jar

      public Jar()
  • Methodendetails

    • getMetadataCharset

      public String getMetadataCharset()
      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
      Setzt außer Kraft:
      getMetadataCharset in Klasse Zip
      Gibt zurück:
      the character set used to encode JAR metadata like file names
      Seit:
      2.14
    • setMetadataCharset

      public void setMetadataCharset(String metadataCharset)
      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
      Setzt außer Kraft:
      setMetadataCharset in Klasse Zip
      Parameter:
      metadataCharset - the character set used to encode JAR metadata like file names
      Seit:
      2.14
    • getManifestContentCharset

      @Input public String getManifestContentCharset()
      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.
      Gibt zurück:
      the character set used to encode the manifest content
      Seit:
      2.14
    • setManifestContentCharset

      public void setManifestContentCharset(String manifestContentCharset)
      The character set used to encode the manifest content.
      Parameter:
      manifestContentCharset - the character set used to encode the manifest content
      Seit:
      2.14
      Siehe auch:
    • getManifest

      @Internal public Manifest getManifest()
      Returns the manifest for this JAR archive.
      Gibt zurück:
      The manifest
    • setManifest

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

      public Jar manifest(@DelegatesTo(Manifest.class) 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.

      Parameter:
      configureClosure - The closure.
      Gibt zurück:
      This.
    • manifest

      public Jar manifest(Action<? super Manifest> configureAction)
      Configures the manifest for this JAR archive.

      The given action is executed to configure the manifest.

      Parameter:
      configureAction - The action.
      Gibt zurück:
      This.
      Seit:
      3.5
    • getMetaInf

      @Internal public CopySpec getMetaInf()
    • metaInf

      public CopySpec metaInf(@DelegatesTo(CopySpec.class) 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.

      Parameter:
      configureClosure - The closure.
      Gibt zurück:
      The created CopySpec
    • metaInf

      public CopySpec metaInf(Action<? super CopySpec> configureAction)
      Adds content to this JAR archive's META-INF directory.

      The given action is executed to configure a CopySpec.

      Parameter:
      configureAction - The action.
      Gibt zurück:
      The created CopySpec
      Seit:
      3.5