api / org.gradle.plugins.signing / Sign

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.

Constructors

<init>

Sign()

Functions

generate

open fun generate(): Unit

Generates the signature files.

getFilesToSign

open fun getFilesToSign(): FileCollection

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

getInputFiles

open fun getInputFiles(): MutableIterable<File>

getOutputFiles

open fun getOutputFiles(): MutableMap<String, File>

getSignatory

open fun getSignatory(): Signatory

Returns the signatory for this signing task.

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(): DomainObjectSet<Signature>

The signatures generated by this task.

getSingleSignature

open fun getSingleSignature(): Signature

Returns the single signature generated by this task.

isRequired

open fun isRequired(): Boolean

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

Defaults to true.

required

open fun required(required: Boolean): Unit

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

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 tasks: Task): Unit

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

open fun sign(vararg publishArtifacts: PublishArtifact): Unit

Configures the task to sign each of the given artifacts

open fun sign(vararg files: File): Unit

Configures the task to sign each of the given files

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

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

open fun sign(vararg configurations: Configuration): Unit

Configures the task to sign every artifact of the given configurations

open fun sign(vararg publications: Publication): Unit

Configures the task to sign every artifact of the given publications

signatory

open fun signatory(signatory: Signatory): Unit

Changes the signatory of the signatures.