Groovy Documentation

org.gradle.plugins.signing
[Groovy] Class SigningSettings

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

class SigningSettings
extends java.lang.Object

The global signing configuration for a project.


Property Summary
static java.lang.String DEFAULT_CONFIGURATION_NAME

The name of the configuration that all signature artifacts will be placed into (�signatures�)

Configuration configuration

The configuration that signature artifacts will be placed into.

Project project

The project that the settings are for

boolean required

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

SignatoryProvider signatories

The provider of signatories.

SignatureTypeProvider signatureTypes

The provider of signature types.

 
Constructor Summary
SigningSettings(Project project)

Configures the signing settings for the given project.

 
Method Summary
void addSignatureSpecConventions(SignatureSpec spec)

Adds conventions to the given spec, using this settings object's default signatory and signature type as the default signatory and signature type for the spec.

protected SignatoryProvider createSignatoryProvider()

Provides the signatory provider.

protected SignatureTypeProvider createSignatureTypeProvider()

Provides the signature type provider.

Configuration getConfiguration()

The configuration that signature artifacts are added to.

protected Configuration getDefaultConfiguration()

Provides the configuration that signature artifacts are added to.

boolean getRequired()

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

Signatory getSignatory()

The signatory that will be used for signing when an explicit signatory has not been specified.

SignatureType getSignatureType()

The signature type that will be used for signing files when an explicit signature type has not been specified.

void required(boolean required)

Sets whether or not signing tasks should fail if no signatory or signature type are configured at generation time.

void setRequired(boolean required)

Sets whether or not signing tasks should fail if no signatory or signature type are configured at generation time.

Sign sign(Task task)

Creates a signing task that depends on and signs the �archive� produced by the given task.

java.util.Collection sign(Task[] tasksToSign)

Sign sign(PublishArtifact artifact)

Sign sign(Configuration configuration)

java.util.Collection sign(Configuration[] configurations)

SignatoryProvider signatories(groovy.lang.Closure closure)

Configures the signatory provider (delegating to its configure method).

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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

DEFAULT_CONFIGURATION_NAME

static final java.lang.String DEFAULT_CONFIGURATION_NAME
The name of the configuration that all signature artifacts will be placed into (�signatures�)


configuration

Configuration configuration
The configuration that signature artifacts will be placed into.

Changing this will not affect any signing already configured.


project

final Project project
The project that the settings are for


required

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

Defaults to true.


signatories

SignatoryProvider signatories
The provider of signatories.


signatureTypes

SignatureTypeProvider signatureTypes
The provider of signature types.


 
Constructor Detail

SigningSettings

SigningSettings(Project project)
Configures the signing settings for the given project.


 
Method Detail

addSignatureSpecConventions

void addSignatureSpecConventions(SignatureSpec spec)
Adds conventions to the given spec, using this settings object's default signatory and signature type as the default signatory and signature type for the spec.


createSignatoryProvider

protected SignatoryProvider createSignatoryProvider()
Provides the signatory provider. Called once during construction.


createSignatureTypeProvider

protected SignatureTypeProvider createSignatureTypeProvider()
Provides the signature type provider. Called once during construction.


getConfiguration

Configuration getConfiguration()
The configuration that signature artifacts are added to.


getDefaultConfiguration

protected Configuration getDefaultConfiguration()
Provides the configuration that signature artifacts are added to. Called once during construction.


getRequired

boolean getRequired()
Whether or not signing tasks should fail if no signatory or signature type are configured at generation time.

Defaults to true.


getSignatory

Signatory getSignatory()
The signatory that will be used for signing when an explicit signatory has not been specified.

Delegates to the signatory provider's default signatory.


getSignatureType

SignatureType getSignatureType()
The signature type that will be used for signing files when an explicit signature type has not been specified.

Delegates to the signature type provider's default type.


required

void required(boolean required)
Sets whether or not signing tasks should fail if no signatory or signature type are configured at generation time.


setRequired

void setRequired(boolean required)
Sets whether or not signing tasks should fail if no signatory or signature type are configured at generation time.


sign

Sign sign(Task task)
Creates a signing task that depends on and signs the �archive� produced by the given task.

The created task will be named �sign�input task name capitalized��. That is, given a task with the name �jar� the created task will be named �signJar�.

If the task is not an AbstractArchiveTask, an InvalidUserDataException will be thrown.

The signature artifact for the created task is added to the for this settings object.

Parameters:
task - The task whose archive is to be signed
Returns:
the created task.


sign

java.util.Collection sign(Task[] tasksToSign)


sign

Sign sign(PublishArtifact artifact)


sign

Sign sign(Configuration configuration)


sign

java.util.Collection sign(Configuration[] configurations)


signatories

SignatoryProvider signatories(groovy.lang.Closure closure)
Configures the signatory provider (delegating to its configure method).
Parameters:
closure - the signatory provider configuration DSL
Returns:
the configured signatory provider


 

Groovy Documentation