From 8425214a0904b42c38dcdf10773fa140b3a551aa Mon Sep 17 00:00:00 2001 From: hasselg Date: Tue, 13 Jul 2021 13:56:22 -0500 Subject: [PATCH] Add signing and publication information --- lib/build.gradle | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/lib/build.gradle b/lib/build.gradle index 74f8ff2..a4132f7 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -1,6 +1,7 @@ plugins { id 'java-library' id 'maven-publish' + id 'signing' id 'com.github.johnrengelman.shadow' version '5.2.0' } @@ -8,7 +9,7 @@ repositories { mavenCentral() } -version = '1.0-SNAPSHOT' +version = '1.0.0' group = 'io.github.par-government' shadowJar { @@ -29,8 +30,7 @@ publishing { publications { shadow(MavenPublication) { publication -> project.shadow.component(publication) - artifact sourceJar - artifact javadocJar + artifacts = [shadowJar, sourceJar, javadocJar] pom { name = 'PAR JWeather' @@ -64,6 +64,23 @@ publishing { } } } + + repositories { + maven { + name = 'sonatype' + def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/' + def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/' + url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl + credentials { + username "$mavenUser" + password "$mavenPassword" + } + } + } +} + +signing { + sign publishing.publications.shadow } dependencies {