Force usage of passed deploy url for sonatype publication (KTI-552)
This commit is contained in:
+1
-1
@@ -381,7 +381,7 @@ apply {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apply {
|
apply {
|
||||||
if (extra["isSonatypeRelease"] as? Boolean == true) {
|
if (extra["isSonatypeRelease"] as? Boolean == true && (extra["deployRepoUrlCustom"] as? String) == null) {
|
||||||
logger.info("Applying configuration for sonatype release")
|
logger.info("Applying configuration for sonatype release")
|
||||||
from("libraries/prepareSonatypeStaging.gradle")
|
from("libraries/prepareSonatypeStaging.gradle")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,17 +110,16 @@ task preparePublication {
|
|||||||
project.ext.isSonatypePublish = repoProvider == 'sonatype'
|
project.ext.isSonatypePublish = repoProvider == 'sonatype'
|
||||||
project.ext.isSonatypeRelease = isSonatypePublish && isRelease
|
project.ext.isSonatypeRelease = isSonatypePublish && isRelease
|
||||||
|
|
||||||
project.ext['signing.keyId'] = project.properties['kotlin.key.name']
|
project.ext.deployRepoUrlCustom = properties["deployRepoUrl"] ?: properties["deploy-url"]
|
||||||
project.ext['signing.password'] = project.properties['kotlin.key.passphrase']
|
|
||||||
|
|
||||||
String sonatypeSnapshotsUrl = (isSonatypePublish && !isRelease) ? "https://oss.sonatype.org/content/repositories/snapshots/" : null
|
String sonatypeSnapshotsUrl = (isSonatypePublish && !isRelease) ? "https://oss.sonatype.org/content/repositories/snapshots/" : null
|
||||||
String repoFolder = properties["deployRepoFolder"] ?: "repo"
|
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.username = properties["deployRepoUsername"] ?: properties["kotlin.${repoProvider}.user"]
|
||||||
ext.password = properties["deployRepoPassword"] ?: properties["kotlin.${repoProvider}.password"]
|
ext.password = properties["deployRepoPassword"] ?: properties["kotlin.${repoProvider}.password"]
|
||||||
|
|
||||||
logger.info("Deployment repository preliminary url: $repoUrl ($repoProvider)")
|
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
println("Deployment repository url: $repoUrl")
|
println("Deployment repository url: $repoUrl")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user