api / org.gradle.plugins.signing.type / SignatureType / sign

sign

abstract fun sign(signatory: Signatory, toSign: File): File

Signs the given file and returns the file where the signature has been written to.

Parameters

signatory - The signatory

toSign - The file to be signed

Return
The file where the signature has been written to

abstract fun sign(signatory: Signatory, toSign: InputStream, destination: OutputStream): Unit

Signs the data from the given InputStream and stores the signature in the given OutputStream.

Parameters

signatory - The signatory

toSign - The source of the data to be signed

destination - Where the signature will be written to