api / org.gradle.plugins.signing / SignOperation

SignOperation

open class SignOperation : SignatureSpec

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

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.

Constructors

<init>

SignOperation()

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

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.

Functions

configure

open fun configure(closure: Closure<Any>): SignOperation

Executes the given closure against this object.

execute

open fun execute(): SignOperation

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.

getDisplayName

open fun getDisplayName(): String

getFilesToSign

open fun getFilesToSign(): FileCollection

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

getSignatory

open fun getSignatory(): Signatory

getSignatureFiles

open fun getSignatureFiles(): FileCollection

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

getSignatureType

open fun getSignatureType(): SignatureType

getSignatures

open fun getSignatures(): MutableList<Signature>

The registered signatures.

getSingleSignature

open fun getSingleSignature(): Signature

Returns the single registered signature.

isRequired

open fun isRequired(): Boolean

setRequired

open fun setRequired(required: Boolean): Unit

setSignatory

open fun setSignatory(signatory: Signatory): Unit

setSignatureType

open fun setSignatureType(signatureType: SignatureType): Unit

sign

open fun sign(vararg artifacts: PublishArtifact): SignOperation

Registers signatures for the given artifacts.

open fun sign(vararg files: File): SignOperation

Registers signatures for the given files.

open fun sign(classifier: String, vararg files: File): SignOperation

Registers signatures (with the given classifier) for the given files

signatory

open fun signatory(signatory: Signatory): SignOperation

Change the signatory for signature generation.

signatureType

open fun signatureType(type: SignatureType): SignOperation

Change the signature type for signature generation.

toString

open fun toString(): String