From 71f0f75cfb43a83b483f9f09127434b10d34e1fd Mon Sep 17 00:00:00 2001 From: Asaf Cohen Date: Thu, 27 Jan 2022 03:26:55 +0200 Subject: [PATCH] another attempted fix of auto-nexus publish --- build.gradle | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index f815e4e..8173add 100644 --- a/build.gradle +++ b/build.gradle @@ -19,9 +19,11 @@ plugins { id("io.github.gradle-nexus.publish-plugin") version "1.1.0" } -// package identifier -groupId = 'io.permit' -artifactId = 'permit-sdk-java' +// It is important to set the group and the version to the root project +// so the nexus-publish plugin can detect if it is a snapshot version +// or not in order to select the correct repository where artifacts will +// be published +group = 'io.permit' // sets the java package version automatically (looks at the git repo, latest tags, commit hashes, etc) version gitVersion() @@ -78,6 +80,9 @@ publishing { publications { maven(MavenPublication) { + groupId = 'io.permit' + artifactId = 'permit-sdk-java' + from components.java pom {