Skip to content

Commit a5e2661

Browse files
Update URL for Sonatype publishing
1 parent e952e82 commit a5e2661

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

sqlcipher/build.gradle

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,8 @@ def isReleaseBuild() {
9999
return mavenVersionName.contains("SNAPSHOT") == false
100100
}
101101

102-
def getReleaseRepositoryUrl() {
103-
return hasProperty('mavenReleaseRepositoryUrl') ? mavenReleaseRepositoryUrl
104-
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
105-
}
106-
107-
def getSnapshotRepositoryUrl() {
108-
if(hasProperty('mavenLocalRepositoryPrefix')) {
109-
return "${mavenLocalRepositoryPrefix}${buildDir}/${mavenSnapshotRepositoryUrl}"
110-
} else {
111-
return hasProperty('mavenSnapshotRepositoryUrl') ? mavenSnapshotRepositoryUrl
112-
: "https://oss.sonatype.org/content/repositories/snapshots/"
113-
}
102+
static def getReleaseRepositoryUrl() {
103+
return "https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/"
114104
}
115105

116106
def getRepositoryUsername() {
@@ -166,9 +156,7 @@ afterEvaluate {
166156

167157
repositories {
168158
maven {
169-
def repoUrl = isReleaseBuild()
170-
? getReleaseRepositoryUrl()
171-
: getSnapshotRepositoryUrl()
159+
def repoUrl = getReleaseRepositoryUrl()
172160
url = repoUrl
173161
credentials {
174162
username = getRepositoryUsername()
@@ -180,7 +168,7 @@ afterEvaluate {
180168
}
181169

182170
signing {
183-
required { isReleaseBuild() && gradle.taskGraph.hasTask("publish") }
171+
required { gradle.taskGraph.hasTask("publish") }
184172
sign publishing.publications.mavenJava
185173
}
186174
}

0 commit comments

Comments
 (0)