File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 11plugins {
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}
You can’t perform that action at this time.
0 commit comments