Infer internal artifacts bootstrap repository

This allows taking these artifacts from buildserver if the
bootstrap itself is taken from there.
This commit is contained in:
Ilya Gorbunov
2020-04-26 07:12:25 +03:00
parent f9bb07e128
commit 86d098b8ad
3 changed files with 11 additions and 1 deletions
+9
View File
@@ -22,6 +22,15 @@ val Project.intellijRepo get() =
else -> "https://www.jetbrains.com/intellij-repository/releases"
}
val Project.internalBootstrapRepo: String? get() =
when {
bootstrapKotlinRepo?.startsWith("https://buildserver.labs.intellij.net") == true ->
bootstrapKotlinRepo!!.replace("artifacts/content/maven", "artifacts/content/internal/repo")
else -> "https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_KotlinPublic_Compiler),number:$bootstrapKotlinVersion," +
"branch:default:any/artifacts/content/internal/repo/"
}
fun Project.commonDep(coord: String): String {
val parts = coord.split(':')
return when (parts.size) {