From afbf7185b720cd58b9a0b2ee91285a92eab51cd1 Mon Sep 17 00:00:00 2001 From: Aman Mangal Date: Fri, 13 Dec 2024 21:36:19 +0530 Subject: [PATCH] fix publishing section in build.gradle (#251) --- PUBLISHING.md | 2 +- build.gradle | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/PUBLISHING.md b/PUBLISHING.md index 6b33d49..f28d515 100644 --- a/PUBLISHING.md +++ b/PUBLISHING.md @@ -34,7 +34,7 @@ ossrhPassword= - Update `dgraph4j version` in `grpc-netty` table in README. - Update CHANGELOG. - Raise a PR for the above changes. Put the changelog in PR description and merge it. -- Run `./gradlew publishAllPublicationsToMavenRepository`. +- Run `./gradlew publishMavenJavaPublicationToMavenRepository`. - Release the deployment by following the steps on the page _Releasing the Deployment_ (link in references below). - Also cut a release tag on GitHub with the new version. diff --git a/build.gradle b/build.gradle index 640d3fc..2be60d3 100644 --- a/build.gradle +++ b/build.gradle @@ -225,14 +225,14 @@ jacocoTestReport { } if (project.hasProperty('ossrhUsername')) { - signing { - sign configurations.archives - } - publishing { + java { + withSourcesJar() + withJavadocJar() + } + repositories { maven { - // change URLs to point to your repos, e.g. http://my.org/repo def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2' credentials { username = ossrhUsername @@ -248,8 +248,12 @@ if (project.hasProperty('ossrhUsername')) { url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl } } + publications { mavenJava(MavenPublication) { + artifactId = 'dgraph4j' + from components.java + pom { name = 'dgraph4j' description = 'Dgraph Java Client' @@ -264,7 +268,7 @@ if (project.hasProperty('ossrhUsername')) { developers { developer { name = 'Dgraph Labs' - email = 'helo@hypermode.com' + email = 'hello@hypermode.com' } } scm { @@ -275,6 +279,10 @@ if (project.hasProperty('ossrhUsername')) { } } } + + signing { + sign publishing.publications.mavenJava + } } task version {