// tag::use-plugin[]
plugins {
// end::use-plugin[]
    id 'java'
    id 'maven'
// tag::use-plugin[]
    id 'signing'
}
// end::use-plugin[]


group = 'gradle'
version = '1.0'

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

// tag::sign-archives[]
signing {
    sign configurations.archives
}
// end::sign-archives[]

// tag::sign-pom[]
uploadArchives {
    repositories {
        mavenDeployer {
// end::sign-pom[]
            repository(url: uri("$buildDir/repo"))
// tag::sign-pom[]
            beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
        }
    }
}
// end::sign-pom[]
