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 SignOperation

    java.lang.Object
      org.gradle.plugins.signing.SignOperation

All Implemented Interfaces:
  SignatureSpec

    class SignOperation
    extends java.lang.Object

A sign operation creates digital signatures for one or more files or publish artifacts.

The external representation of the signature is specified by the signature type property, while the signatory property specifies who is to sign.

A sign operation manages one or more Signature objects. The `sign` methods are used to register things to generate signatures for. The execute() method generates the signatures for all of the registered items at that time.

Property Summary
`Signatory` | `signatory` The signatory to the generated digital signatures.
`SignatureType` | `signatureType` The file representation of the signature(s).

Method Summary
`SignOperation` | `configure(groovy.lang.Closure closure)` Executes the given closure against this object.
`SignOperation` | `execute()` Generates actual signature files for all of the registered signatures.
`java.lang.String` | `getDisplayName()`
`FileCollection` | `getFilesToSign()` All of the files that will be signed by this operation.
`FileCollection` | `getSignatureFiles()` All of the signature files that will be generated by this operation.
`java.util.List` | `getSignatures()` The registered signatures.
`Signature` | `getSingleSignature()` Returns the the single registered signature.
`SignOperation` | `sign(PublishArtifact... artifacts)` Registers signatures for the given artifacts.
`SignOperation` | `sign(java.io.File... files)` Registers signatures for the given files.
`SignOperation` | `sign(java.lang.String classifier, java.io.File... files)` Registers signatures (with the given classifier) for the given files
`SignOperation` | `signatory(Signatory signatory)` Change the signatory for signature generation.
`SignOperation` | `signatureType(SignatureType type)` Change the signature type for signature generation.
`java.lang.String` | `toString()`

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

### signatory

    Signatory signatory

  The signatory to the generated digital signatures.

### signatureType

    SignatureType signatureType

  The file representation of the signature(s).

Method Detail

### configure

    SignOperation configure(groovy.lang.Closure closure)

  Executes the given closure against this object.

### execute

    SignOperation execute()

  Generates actual signature files for all of the registered signatures.

  The signatures are generated with the configuration they have at this time, which includes the signature type and signatory of this operation at this time.

  This method can be called multiple times, with the signatures being generated with their current configuration each time.

  Returns:
    this
  See Also:
    Signature.generate

### getDisplayName

    java.lang.String getDisplayName()

### getFilesToSign

    FileCollection getFilesToSign()

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

### getSignatureFiles

    FileCollection getSignatureFiles()

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

### getSignatures

    java.util.List getSignatures()

  The registered signatures.

### getSingleSignature

    Signature getSingleSignature()

  Returns the the single registered signature.
  throws:
    IllegalStateException if there is not exactly one registered signature.
  Returns:
    The signature.

### sign

    SignOperation sign(PublishArtifact... artifacts)

  Registers signatures for the given artifacts.
  Returns:
    this
  See Also:
    Signature.Signature

### sign

    SignOperation sign(java.io.File... files)

  Registers signatures for the given files.
  Returns:
    this
  See Also:
    Signature.Signature

### sign

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

  Registers signatures (with the given classifier) for the given files
  Returns:
    this
  See Also:
    Signature.Signature

### signatory

    SignOperation signatory(Signatory signatory)

  Change the signatory for signature generation.

### signatureType

    SignOperation signatureType(SignatureType type)

  Change the signature type for signature generation.

### toString

    java.lang.String toString()

Groovy Documentation