Skip to content

Commit 5574a90

Browse files
authored
more publish fixes (#33)
1 parent 0536dd5 commit 5574a90

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ def getReleaseRepositoryUrl() {
2222
: "https://ossrh-staging-api.central.sonatype.com/service/local/"
2323
}
2424

25+
def getSnapshotRepositoryUrl() {
26+
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
27+
: "https://central.sonatype.com/repository/maven-snapshots/"
28+
}
29+
2530
def getRepositoryUsername() {
2631
return hasProperty('nexusUsername') ? nexusUsername : ""
2732
}
@@ -35,6 +40,7 @@ nexusPublishing {
3540
repositories {
3641
maven {
3742
nexusUrl.set(uri(getReleaseRepositoryUrl()))
43+
snapshotRepositoryUrl.set(uri(getSnapshotRepositoryUrl()))
3844
username = getRepositoryUsername()
3945
password = getRepositoryPassword()
4046
stagingProfileId = STAGING_PROFILE_ID

0 commit comments

Comments
 (0)