File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,13 +66,17 @@ afterEvaluate {
6666}
6767
6868if (project. hasProperty(" ossrhUsername" ) && project. hasProperty(" ossrhPassword" )) {
69+ def snapshotRepositoryUrl = ' https://central.sonatype.com/repository/maven-snapshots/'
70+ def releaseRepositoryUrl = ' https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/'
71+ def stagingServerUrl = ' https://ossrh-staging-api.central.sonatype.com/service/local/'
72+
6973 publishing {
7074 repositories {
7175 maven {
7276 name = ' sonatype'
7377 url = uri(project. version. toString(). endsWith(' -SNAPSHOT' )
74- ? ' https://oss.sonatype.org/content/repositories/snapshots/ '
75- : ' https://oss.sonatype.org/service/local/staging/deploy/maven2/ ' )
78+ ? snapshotRepositoryUrl
79+ : releaseRepositoryUrl )
7680 credentials {
7781 username = project. property(" ossrhUsername" )
7882 password = project. property(" ossrhPassword" )
@@ -82,6 +86,7 @@ if (project.hasProperty("ossrhUsername") && project.hasProperty("ossrhPassword")
8286 }
8387
8488 nexusStaging {
89+ serverUrl stagingServerUrl
8590 username project. property(" ossrhUsername" )
8691 password project. property(" ossrhPassword" )
8792 packageGroup ' io.github.codedabble-dev'
You can’t perform that action at this time.
0 commit comments