# SigningExtension

abstract class SigningExtension(source)

The global signing configuration for a project.

## Constructors

SigningExtension
Link copied to clipboard
constructor(project: Project)
Configures the signing settings for the given project.

## Properties

configuration
Link copied to clipboard
open var configuration: Configuration
The configuration that signature artifacts will be placed into.
DEFAULT_CONFIGURATION_NAME
Link copied to clipboard
val DEFAULT_CONFIGURATION_NAME: String = "signatures"
The name of the configuration that all signature artifacts will be placed into ("signatures")
project
Link copied to clipboard
val project: Project
The project that the settings are for
signatories
Link copied to clipboard
open var signatories: SignatoryProvider<out Any>
The provider of signatories.
signatureTypes
Link copied to clipboard
open var signatureTypes: SignatureTypeProvider
The provider of signature types.

## Functions

getSignatory
Link copied to clipboard
open fun getSignatory(): Signatory
The signatory that will be used for signing when an explicit signatory has not been specified.
getSignatureType
Link copied to clipboard
open fun getSignatureType(): SignatureType
The signature type that will be used for signing files when an explicit signature type has not been specified.
isRequired
Link copied to clipboard
open fun isRequired(): Boolean
Whether this task should fail if no signatory or signature type are configured at generation time.
setRequired
Link copied to clipboard
open fun setRequired(required: Boolean)
open fun setRequired(required: Any)
Whether this task should fail if no signatory or signature type are configured at generation time.
sign
Link copied to clipboard
open fun sign(@DelegatesTo(value = SignOperation::class) closure: Closure<out Any>): SignOperation
Creates a new sign operation using the given closure to configure it before executing it.
open fun sign(files: Array<File>): SignOperation
open fun sign(classifier: String, files: Array<File>): SignOperation
Digitally signs the files, generating signature files alongside them.
@Incubating
open fun sign(setup: Action<SignOperation>): SignOperation
Creates a new sign operation using the given action to configure it before executing it.
open fun sign(publications: DomainObjectCollection<Publication>): List<Sign>
Creates signing tasks that sign all publishable artifacts of the given publication collection.
open fun sign(tasks: Array<Task>): List<Sign>
Creates signing tasks that depend on and sign the "archive" produced by the given tasks.
open fun sign(configurations: Array<Configuration>): List<Sign>
Creates signing tasks that sign all artifacts of the given configurations.
open fun sign(publishArtifacts: Array<PublishArtifact>): SignOperation
Digitally signs the publish artifacts, generating signature files alongside them.
open fun sign(publications: Array<Publication>): List<Sign>
Creates signing tasks that sign all publishable artifacts of the given publications.
signatories
Link copied to clipboard
open fun signatories(closure: Closure<out Any>): SignatoryProvider<out Any>
Configures the signatory provider (delegating to its configure method).
@Incubating
open fun signatories(action: Action<in SignatoryProvider<out Any>>)
Configures the signatory provider with the given action.
useGpgCmd
Link copied to clipboard
open fun useGpgCmd()
Use GnuPG agent to perform signing work.
useInMemoryPgpKeys
Link copied to clipboard
open fun useInMemoryPgpKeys(@Nullable defaultSecretKey: @Nullable String, @Nullable defaultPassword: @Nullable String)
open fun useInMemoryPgpKeys(@Nullable defaultKeyId: @Nullable String, @Nullable defaultSecretKey: @Nullable String, @Nullable defaultPassword: @Nullable String)
Use the supplied ascii-armored in-memory PGP secret key and password instead of reading it from a keyring.