diff --git a/build.gradle b/build.gradle index 31c15a5..231f416 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,7 @@ plugins { id 'java-library' id 'maven-publish' + id 'signing' } group = 'io.github.mrsaraira' @@ -30,6 +31,12 @@ test { useJUnitPlatform() } +signing { + required { gradle.taskGraph.hasTask("generateMetadataFileForMavenPublication") } + + sign publishing.publications +} + publishing { publications { maven(MavenPublication) { diff --git a/gradle.properties b/gradle.properties index 2e42fec..384242f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,11 @@ LIB_LOMBOK_VERSION=1.18.30 LIB_JUNIT_BOM=5.9.1 LIB_SLF4J_API=2.0.9 + +signing.keyId= +signing.password= +signing.secretKeyRingFile= + +mavenUsername= +mavenPassword= +