open class SigningExtension
The global signing configuration for a project.
SigningExtension(project: Project)
Configures the signing settings for the given project. |
static val DEFAULT_CONFIGURATION_NAME: String
The name of the configuration that all signature artifacts will be placed into ("signatures") |
open fun getConfiguration(): Configuration
The configuration that signature artifacts are added to. |
|
fun getProject(): Project |
|
open fun getSignatories(): SignatoryProvider<Signatory> |
|
open fun getSignatory(): Signatory
The signatory that will be used for signing when an explicit signatory has not been specified. Delegates to the signatory provider's default signatory. |
|
open fun getSignatureType(): SignatureType
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. |
|
open fun getSignatureTypes(): SignatureTypeProvider |
|
open fun isRequired(): Boolean
Whether or not this task should fail if no signatory or signature type are configured at generation time. Defaults to |
|
open fun setConfiguration(configuration: Configuration): Unit |
|
open fun setRequired(required: Boolean): Unit
Whether or not this task should fail if no signatory or signature type are configured at generation time. open fun setRequired(required: Any): Unit
Whether or not this task should fail if no signatory or signature type are configured at generation time. If Because the task graph is not known until Gradle starts executing, we must use defer the decision. We can do this via using a Closure (which is a Callable). For any other type, the value will be stored and evaluated on demand according to the Groovy Truth.
|
|
open fun setSignatories(signatories: SignatoryProvider<Signatory>): Unit |
|
open fun setSignatureTypes(signatureTypes: SignatureTypeProvider): Unit |
|
open fun sign(vararg tasks: Task): MutableList<Sign>
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 org.gradle.api.tasks.bundling.AbstractArchiveTask, an InvalidUserDataException will be thrown. The signature artifact for the created task is added to the open fun sign(vararg configurations: Configuration): MutableList<Sign>
Creates signing tasks that sign The created tasks will be named "sign<configuration name capitalized>". That is, given a configuration with the name "archives" the created task will be named "signArchives". The signature artifacts for the created tasks are added to the open fun sign(vararg publications: Publication): MutableList<Sign>
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. open fun sign(publications: DomainObjectCollection<Publication>): MutableList<Sign>
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. open fun sign(vararg publishArtifacts: PublishArtifact): SignOperation
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. open fun sign(vararg files: File): SignOperation open fun sign(classifier: String, vararg files: File): SignOperation
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. open fun sign(closure: Closure<Any>): SignOperation
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. |
|
open fun signPom(mavenDeployment: MavenDeployment, closure: Closure<Any>): Signature open fun signPom(mavenDeployment: MavenDeployment): Signature
Signs the POM artifact for the given Maven deployment. You can use this method to sign the generated POM when publishing to a Maven repository with the Maven plugin.
You can optionally provide a configuration closure to fine tune the SignOperation for the POM. If Note: Signing the generated POM file generated by the Maven Publishing plugin is currently not supported. Future versions of Gradle might add this functionality. |
|
open fun signatories(closure: Closure<Any>): SignatoryProvider<Signatory>
Configures the signatory provider (delegating to its |
|
open fun useGpgCmd(): Unit
Use GnuPG agent to perform signing work. |
val SigningExtension.ext: ExtraPropertiesExtension
Retrieves the ext extension. |
fun SigningExtension.ext(configure: ExtraPropertiesExtension.() -> Unit): Unit
Configures the ext extension. |