# Signature

constructor(toSign: PublishArtifact, signatureSpec: SignatureSpec, tasks: Array<Any>)(source)

Creates a signature artifact for the given public artifact.

The file to sign will be the file of the given artifact and the classifier of this signature artifact will default to the classifier of the given artifact to sign.

The artifact to sign may change after being used as the source for this signature.

#### Parameters

toSign

The artifact that is to be signed

signatureSpec

The specification of how the artifact is to be signed

tasks

The task(s) that will invoke generate on this signature (optional)

constructor(toSign: File, signatureSpec: SignatureSpec, tasks: Array<Any>)(source)

Creates a signature artifact for the given file.

#### Parameters

toSign

The file that is to be signed

signatureSpec

The specification of how the artifact is to be signed

tasks

The task(s) that will invoke generate on this signature (optional)

constructor(toSign: File, classifier: String, signatureSpec: SignatureSpec, tasks: Array<Any>)(source)

Creates a signature artifact for the given file, with the given classifier.

#### Parameters

toSign

The file that is to be signed

classifier

The classifier to assign to the signature (should match the files)

signatureSpec

The specification of how the artifact is to be signed

tasks

The task(s) that will invoke generate on this signature (optional)

constructor(toSign: Closure<File>, classifier: Closure<String>, signatureSpec: SignatureSpec, tasks: Array<Any>)(source)
constructor(toSign: Callable<File>, classifier: Callable<String>, signatureSpec: SignatureSpec, tasks: Array<Any>)(source)

Creates a signature artifact for the file returned by the `toSign` closure.

The closures will be “evaluated” on demand whenever the value is needed (e.g. at generation time)

#### Parameters

toSign

A closure that produces a File for the object to sign (non File return values will be used as the path to the file)

classifier

A closure that produces the classifier to assign to the signature artifact on demand

signatureSpec

The specification of how the artifact is to be signed

tasks

The task(s) that will invoke generate on this signature (optional)