Force usage of passed deploy url for sonatype publication (KTI-552)
This commit is contained in:
@@ -110,17 +110,16 @@ task preparePublication {
|
||||
project.ext.isSonatypePublish = repoProvider == 'sonatype'
|
||||
project.ext.isSonatypeRelease = isSonatypePublish && isRelease
|
||||
|
||||
project.ext['signing.keyId'] = project.properties['kotlin.key.name']
|
||||
project.ext['signing.password'] = project.properties['kotlin.key.passphrase']
|
||||
|
||||
project.ext.deployRepoUrlCustom = properties["deployRepoUrl"] ?: properties["deploy-url"]
|
||||
String sonatypeSnapshotsUrl = (isSonatypePublish && !isRelease) ? "https://oss.sonatype.org/content/repositories/snapshots/" : null
|
||||
String repoFolder = properties["deployRepoFolder"] ?: "repo"
|
||||
ext.repoUrl = properties["deployRepoUrl"] ?: sonatypeSnapshotsUrl ?: properties["deploy-url"] ?: "file://${rootProject.buildDir}/${repoFolder}".toString()
|
||||
|
||||
ext.repoUrl = project.ext.deployRepoUrlCustom ?: sonatypeSnapshotsUrl ?: "file://${rootProject.buildDir}/${repoFolder}"
|
||||
logger.info("Deployment repository preliminary url: $repoUrl ($repoProvider)")
|
||||
|
||||
ext.username = properties["deployRepoUsername"] ?: properties["kotlin.${repoProvider}.user"]
|
||||
ext.password = properties["deployRepoPassword"] ?: properties["kotlin.${repoProvider}.password"]
|
||||
|
||||
logger.info("Deployment repository preliminary url: $repoUrl ($repoProvider)")
|
||||
|
||||
doLast {
|
||||
println("Deployment repository url: $repoUrl")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user