Skip to content

Commit 4bc1b83

Browse files
committed
updates gradle file
1 parent 7d22809 commit 4bc1b83

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins {
22
id 'java-library'
3+
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
34
id 'maven-publish'
45
id 'signing'
56
}
@@ -98,16 +99,15 @@ publishing {
9899
}
99100
}
100101
}
102+
}
103+
104+
nexusPublishing {
101105
repositories {
102-
maven {
103-
// change URLs to point to your repos, e.g. http://my.org/repo
104-
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
105-
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
106-
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
107-
credentials {
108-
username = project.findProperty("MAVEN_USERNAME") ?: System.getenv("MAVEN_USERNAME")
109-
password = project.findProperty("MAVEN_PASSWORD") ?: System.getenv("MAVEN_PASSWORD")
110-
}
106+
sonatype {
107+
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
108+
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
109+
username = project.findProperty("MAVEN_USERNAME") ?: System.getenv("MAVEN_USERNAME")
110+
password = project.findProperty("MAVEN_PASSWORD") ?: System.getenv("MAVEN_PASSWORD")
111111
}
112112
}
113113
}

0 commit comments

Comments
 (0)