|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
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 |
---|
static final java.lang.String DEFAULT_CONFIGURATION_NAME
Configuration configuration
Changing this will not affect any signing already configured.
final Project project
boolean required
Defaults to true.
SignatoryProvider signatories
SignatureTypeProvider signatureTypes
Constructor Detail |
---|
SigningSettings(Project project)
Method Detail |
---|
void addSignatureSpecConventions(SignatureSpec spec)
protected SignatoryProvider createSignatoryProvider()
protected SignatureTypeProvider createSignatureTypeProvider()
Configuration getConfiguration()
protected Configuration getDefaultConfiguration()
boolean getRequired()
Defaults to true.
Signatory getSignatory()
Delegates to the signatory provider's default signatory.
SignatureType getSignatureType()
Delegates to the signature type provider's default type.
void required(boolean required)
void setRequired(boolean required)
Sign sign(Task 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.
task
- The task whose archive is to be signed
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)
closure
- the signatory provider configuration DSL
Groovy Documentation