mirror of https://github.com/grpc/grpc-java.git
buildscripts: avoid remote repo vars in uploadArchives for local (#4076)
This commit is contained in:
parent
3480a08e70
commit
8925921805
24
build.gradle
24
build.gradle
|
@ -311,21 +311,21 @@ subprojects {
|
|||
|
||||
uploadArchives.repositories.mavenDeployer {
|
||||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
||||
String stagingUrl
|
||||
if (rootProject.hasProperty('repositoryId')) {
|
||||
stagingUrl = 'https://oss.sonatype.org/service/local/staging/deployByRepositoryId/' +
|
||||
rootProject.repositoryId
|
||||
} else {
|
||||
stagingUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
|
||||
}
|
||||
def configureAuth = {
|
||||
if (rootProject.hasProperty('ossrhUsername') && rootProject.hasProperty('ossrhPassword')) {
|
||||
authentication(userName: rootProject.ossrhUsername, password: rootProject.ossrhPassword)
|
||||
}
|
||||
}
|
||||
if (rootProject.hasProperty('repositoryDir')) {
|
||||
repository(url: new File(rootProject.repositoryDir).toURI())
|
||||
} else {
|
||||
String stagingUrl
|
||||
if (rootProject.hasProperty('repositoryId')) {
|
||||
stagingUrl = 'https://oss.sonatype.org/service/local/staging/deployByRepositoryId/' +
|
||||
rootProject.repositoryId
|
||||
} else {
|
||||
stagingUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
|
||||
}
|
||||
def configureAuth = {
|
||||
if (rootProject.hasProperty('ossrhUsername') && rootProject.hasProperty('ossrhPassword')) {
|
||||
authentication(userName: rootProject.ossrhUsername, password: rootProject.ossrhPassword)
|
||||
}
|
||||
}
|
||||
repository(url: stagingUrl, configureAuth)
|
||||
snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots/', configureAuth)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue