plugins {
    id 'signing'
}

// Typically set in ~/.gradle/gradle.properties
project.ext['signing.keyId'] = '24875D73'
project.ext['signing.password'] = 'gradle'
project.ext['signing.secretKeyRingFile'] = file('secKeyRingFile.gpg').absolutePath

// tag::sign-task[]
task stuffZip (type: Zip) {
    baseName = 'stuff'
    from 'src/stuff'
}

signing {
    sign stuffZip
}
// end::sign-task[]
