api / org.gradle.plugins.signing / SignatureSpec

SignatureSpec

interface SignatureSpec

Specifies how objects will be signed.

Functions

getSignatory

abstract fun getSignatory(): Signatory

The signatory that will be performing the signing.

getSignatureType

abstract fun getSignatureType(): SignatureType

The signature representation that will be created.

isRequired

abstract fun isRequired(): Boolean

Whether or not it is required that this signature be generated. A signature may not be able to be generated if a signatory and/or a signature type have not been specified. If it is required and cannot be generated, an exception will be thrown. Otherwise, it will not be generated.

setRequired

abstract fun setRequired(required: Boolean): Unit

Whether or not it is required that this signature be generated.

setSignatory

abstract fun setSignatory(signatory: Signatory): Unit

Sets the signatory that will be signing the input.

setSignatureType

abstract fun setSignatureType(type: SignatureType): Unit

Sets the signature representation that the signatures will be produced as.

Inheritors

Sign

open class Sign : DefaultTask, SignatureSpec

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.

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.