Table of Contents
API Documentation: | SigningExtension |
---|
The global signing configuration for a project.
Property | Description |
required | Whether this task should fail if no signatory or signature type are configured at generation time. |
signatory | The signatory that will be used for signing when an explicit signatory has not been specified. |
signatureType | The signature type that will be used for signing files when an explicit signature type has not been specified. |
Method | Description |
sign(closure) | Creates a new |
sign(files) | Digitally signs the files, generating signature files alongside them. |
sign(classifier, files) | Digitally signs the files, generating signature files alongside them. |
sign(setup) | Incubating Creates a new |
sign(publications) | Creates signing tasks that sign all publishable artifacts of the given publication collection. |
sign(tasks) | Creates signing tasks that depend on and sign the "archive" produced by the given tasks. |
sign(configurations) | Creates signing tasks that sign |
sign(publishArtifacts) | Digitally signs the publish artifacts, generating signature files alongside them. |
sign(publications) | Creates signing tasks that sign all publishable artifacts of the given publications. |
Whether this task should fail if no signatory or signature type are configured at generation time.
Defaults to true
.
Signatory
signatory
(read-only)
The signatory that will be used for signing when an explicit signatory has not been specified.
Delegates to the signatory provider's default signatory.
SignatureType
signatureType
(read-only)
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.
SignOperation
sign
(Closure
<?>
closure)
Closure
<?>Creates a new SignOperation
using the given closure to configure it before executing it.
The project's default signatory and default signature type from the SigningExtension
will be used to generate the signature.
The returned SignOperation
gives access to the created signature files.
If there is no configured default signatory available (and one is not explicitly specified in this operation's configuration), the sign operation will fail.
SignOperation
sign
(File
...
files)
File
...Digitally signs the files, generating signature files alongside them.
The project's default signatory and default signature type from the SigningExtension
will be used to generate the signature.
The returned SignOperation
gives access to the created signature files.
If there is no configured default signatory available, the sign operation will fail.
SignOperation
sign
(String
classifier, File
...
files)
File
...Digitally signs the files, generating signature files alongside them.
The project's default signatory and default signature type from the SigningExtension
will be used to generate the signature.
The returned SignOperation
gives access to the created signature files.
If there is no configured default signatory available, the sign operation will fail.
SignOperation
sign
(Action
<SignOperation
>
setup)
Action
<SignOperation
>Note: This method is incubating and may change in a future version of Gradle.
Creates a new SignOperation
using the given action to configure it before executing it.
The project's default signatory and default signature type from the SigningExtension
will be used to generate the signature.
The returned SignOperation
gives access to the created signature files.
If there is no configured default signatory available (and one is not explicitly specified in this operation's configuration), the sign operation will fail.
List
<Sign
>
sign
(DomainObjectCollection
<Publication
>
publications)
List
<Sign
>DomainObjectCollection
<Publication
>Creates signing tasks that sign all publishable artifacts of the given publication collection.
The created tasks will be named "sign<publication name capitalized>Publication". That is, given a publication with the name "mavenJava" the created task will be named "signMavenJavaPublication". The signature artifacts for the created tasks are added to the publishable artifacts of the given publications.
Creates signing tasks that depend on and sign the "archive" produced by the given tasks.
The created tasks 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 SigningExtension.getConfiguration()
.
List
<Sign
>
sign
(Configuration
...
configurations)
List
<Sign
>Configuration
...Creates signing tasks that sign Configuration.getAllArtifacts()
of the given configurations.
The created tasks will be named "sign<configuration name capitalized>". That is, given a configuration with the name "conf" the created task will be named "signConf".
The signature artifacts for the created tasks are added to the SigningExtension.getConfiguration()
for this settings object.
SignOperation
sign
(PublishArtifact
...
publishArtifacts)
PublishArtifact
...Digitally signs the publish artifacts, generating signature files alongside them.
The project's default signatory and default signature type from the SigningExtension
will be used to generate the signature.
The returned SignOperation
gives access to the created signature files.
If there is no configured default signatory available, the sign operation will fail.
List
<Sign
>
sign
(Publication
...
publications)
List
<Sign
>Publication
...Creates signing tasks that sign all publishable artifacts of the given publications.
The created tasks will be named "sign<publication name capitalized>Publication". That is, given a publication with the name "mavenJava" the created task will be named "signMavenJavaPublication". The signature artifacts for the created tasks are added to the publishable artifacts of the given publications.