Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix publishing section in build.gradle #251

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PUBLISHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ossrhPassword=<token>
- 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.

Expand Down
20 changes: 14 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand All @@ -264,7 +268,7 @@ if (project.hasProperty('ossrhUsername')) {
developers {
developer {
name = 'Dgraph Labs'
email = 'helo@hypermode.com'
email = 'hello@hypermode.com'
}
}
scm {
Expand All @@ -275,6 +279,10 @@ if (project.hasProperty('ossrhUsername')) {
}
}
}

signing {
sign publishing.publications.mavenJava
}
}

task version {
Expand Down
Loading