Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.gradle.plugins.signing
[Groovy] Class Sign

    java.lang.Object
      org.gradle.api.internal.AbstractTask
          org.gradle.api.DefaultTask
              org.gradle.plugins.signing.Sign

All Implemented Interfaces:
  SignatureSpec

    class Sign
    extends DefaultTask

A task for creating digital signature files for one or more; tasks, files, publishable artifacts or configurations.

The task produces Signature

objects that are publishable artifacts and can be assigned to another configuration.

The signature objects are created with defaults and using this tasks signatory and signature type.

Field Summary

Fields inherited from class org.gradle.api.internal.AbstractTask
TASK_NAME, TASK_DESCRIPTION, TASK_GROUP, TASK_TYPE, TASK_DEPENDS_ON, TASK_OVERWRITE, TASK_ACTION

Property Summary
`boolean` | `required` Whether or not this task should fail if no signatory or signature type are configured at generation time.
`Signatory` | `signatory` The signatory to the generated signatures.
`SignatureType` | `signatureType`

Constructor Summary
`Sign()`

Method Summary
`void` | `generate()` Generates the signature files.
`FileCollection` | `getFilesToSign()` All of the files that will be signed by this task.
`FileCollection` | `getSignatureFiles()` All of the signature files that will be generated by this operation.
`DomainObjectSet` | `getSignatures()` The signatures generated by this task.
`Signature` | `getSingleSignature()` Returns the the single signature generated by this task.
`void` | `required(boolean required)` Change whether or not this task should fail if no signatory or signature type are configured at the time of generation.
`void` | `sign(Task tasks)` Configures the task to sign the archive produced for each of the given tasks (which must be archive tasks).
`void` | `sign(PublishArtifact publishArtifacts)` Configures the task to sign each of the given artifacts
`void` | `sign(java.io.File files)` Configures the task to sign each of the given files
`void` | `sign(java.lang.String classifier, java.io.File files)` Configures the task to sign each of the given artifacts, using the given classifier as the classifier for the resultant signature publish artifact.
`void` | `sign(Configuration configurations)` Configures the task to sign every artifact of the given configurations
`void` | `signatory(Signatory signatory)` Changes the signatory of the signatures.
`void` | `signatureType(SignatureType type)` Changes the signature file representation for the signatures.

Methods inherited from class org.gradle.api.internal.AbstractTask
org.gradle.api.internal.AbstractTask#setProperty(java.lang.String, java.lang.Object), org.gradle.api.internal.AbstractTask#toString(), org.gradle.api.internal.AbstractTask#compareTo(org.gradle.api.Task), org.gradle.api.internal.AbstractTask#compareTo(java.lang.Object), org.gradle.api.internal.AbstractTask#getName(), org.gradle.api.internal.AbstractTask#getActions(), org.gradle.api.internal.AbstractTask#setName(java.lang.String), org.gradle.api.internal.AbstractTask#getState(), org.gradle.api.internal.AbstractTask#getPath(), org.gradle.api.internal.AbstractTask#getLogger(), org.gradle.api.internal.AbstractTask#execute(), org.gradle.api.internal.AbstractTask#configure(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#configure(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#getDescription(), org.gradle.api.internal.AbstractTask#isEnabled(), org.gradle.api.internal.AbstractTask#captureStandardOutput(org.gradle.api.logging.LogLevel), org.gradle.api.internal.AbstractTask#disableStandardOutputCapture(), org.gradle.api.internal.AbstractTask#property(java.lang.String), org.gradle.api.internal.AbstractTask#setEnabled(boolean), org.gradle.api.internal.AbstractTask#setDescription(java.lang.String), org.gradle.api.internal.AbstractTask#getProject(), org.gradle.api.internal.AbstractTask#getGroup(), org.gradle.api.internal.AbstractTask#setGroup(java.lang.String), org.gradle.api.internal.AbstractTask#dependsOn([Ljava.lang.Object;), org.gradle.api.internal.AbstractTask#getAnt(), org.gradle.api.internal.AbstractTask#getConvention(), org.gradle.api.internal.AbstractTask#hasProperty(java.lang.String), org.gradle.api.internal.AbstractTask#getLogging(), org.gradle.api.internal.AbstractTask#getExtensions(), org.gradle.api.internal.AbstractTask#executeWithoutThrowingTaskFailure(), org.gradle.api.internal.AbstractTask#setActions(java.util.List), org.gradle.api.internal.AbstractTask#getTaskDependencies(), org.gradle.api.internal.AbstractTask#getTaskDependencies(), org.gradle.api.internal.AbstractTask#getDependsOn(), org.gradle.api.internal.AbstractTask#setDependsOn(java.lang.Iterable), org.gradle.api.internal.AbstractTask#onlyIf(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#onlyIf(org.gradle.api.specs.Spec), org.gradle.api.internal.AbstractTask#setOnlyIf(org.gradle.api.specs.Spec), org.gradle.api.internal.AbstractTask#setOnlyIf(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#setDidWork(boolean), org.gradle.api.internal.AbstractTask#getDidWork(), org.gradle.api.internal.AbstractTask#doFirst(org.gradle.api.Action), org.gradle.api.internal.AbstractTask#doFirst(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#doLast(org.gradle.api.Action), org.gradle.api.internal.AbstractTask#doLast(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#leftShift(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#deleteAllActions(), org.gradle.api.internal.AbstractTask#getEnabled(), org.gradle.api.internal.AbstractTask#dependsOnTaskDidWork(), org.gradle.api.internal.AbstractTask#getInputs(), org.gradle.api.internal.AbstractTask#getOutputs(), org.gradle.api.internal.AbstractTask#getOutputs(), org.gradle.api.internal.AbstractTask#getTemporaryDir(), org.gradle.api.internal.AbstractTask#setProject(org.gradle.api.Project), org.gradle.api.internal.AbstractTask#getStandardOutputCapture(), org.gradle.api.internal.AbstractTask#getAdditionalProperties(), org.gradle.api.internal.AbstractTask#getDynamicObjectHelper(), org.gradle.api.internal.AbstractTask#getAsDynamicObject(), org.gradle.api.internal.AbstractTask#addValidator(org.gradle.api.internal.tasks.execution.TaskValidator), org.gradle.api.internal.AbstractTask#getValidators(), org.gradle.api.internal.AbstractTask#getExecuter(), org.gradle.api.internal.AbstractTask#setExecuter(org.gradle.api.internal.tasks.TaskExecuter), org.gradle.api.internal.AbstractTask#getOnlyIf(), org.gradle.api.internal.AbstractTask#injectIntoNewInstance(org.gradle.api.internal.project.ProjectInternal, java.lang.String, java.util.concurrent.Callable), org.gradle.api.internal.AbstractTask#wait(long), org.gradle.api.internal.AbstractTask#wait(long, int), org.gradle.api.internal.AbstractTask#wait(), org.gradle.api.internal.AbstractTask#equals(java.lang.Object), org.gradle.api.internal.AbstractTask#hashCode(), org.gradle.api.internal.AbstractTask#getClass(), org.gradle.api.internal.AbstractTask#notify(), org.gradle.api.internal.AbstractTask#notifyAll()

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Property Detail

### required

    boolean required

  Whether or not this task should fail if no signatory or signature type are configured at generation time.

  Defaults to `true`.

### signatory

    Signatory signatory

  The signatory to the generated signatures.

### signatureType

    SignatureType signatureType

Constructor Detail

### Sign

    Sign()

Method Detail

### generate

    @TaskAction
    void generate()

  Generates the signature files.

### getFilesToSign

    FileCollection getFilesToSign()

  All of the files that will be signed by this task.

### getSignatureFiles

    FileCollection getSignatureFiles()

  All of the signature files that will be generated by this operation.

### getSignatures

    DomainObjectSet getSignatures()

  The signatures generated by this task.

### getSingleSignature

    Signature getSingleSignature()

  Returns the the single signature generated by this task.
  throws:
    IllegalStateException if there is not exactly one signature.
  Returns:
    The signature.

### required

    void required(boolean required)

  Change whether or not this task should fail if no signatory or signature type are configured at the time of generation.

### sign

    void sign(Task tasks)

  Configures the task to sign the archive produced for each of the given tasks (which must be archive tasks).

### sign

    void sign(PublishArtifact publishArtifacts)

  Configures the task to sign each of the given artifacts

### sign

    void sign(java.io.File files)

  Configures the task to sign each of the given files

### sign

    void sign(java.lang.String classifier, java.io.File files)

  Configures the task to sign each of the given artifacts, using the given classifier as the classifier for the resultant signature publish artifact.

### sign

    void sign(Configuration configurations)

  Configures the task to sign every artifact of the given configurations

### signatory

    void signatory(Signatory signatory)

  Changes the signatory of the signatures.

### signatureType

    void signatureType(SignatureType type)

  Changes the signature file representation for the signatures.

Groovy Documentation