Skip to content

Commit 9a166c7

Browse files
Add new central portal releaseRepoUrl (#832)
1 parent 71a3040 commit 9a166c7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

buildSrc/src/main/groovy/com.google.api-ads.java-conventions.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ publishing {
9595
}
9696
repositories {
9797
maven {
98-
url 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
98+
def releaseRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2'
99+
def snapshotRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
100+
101+
// Set the URL dynamically based on the project version
102+
url = project.version.endsWith('SNAPSHOT') ? snapshotRepoUrl : releaseRepoUrl
99103
name = "sonatype"
100104
credentials {
101105
// Avoids storing Sonatype credentials in plain-text. Specify these on

0 commit comments

Comments
 (0)