Reduce dependency on teamcity.jetbrains.com when downloading dependencies

This commit is contained in:
Nikolay Krasko
2021-11-18 20:09:12 +03:00
committed by TeamCityServer
parent 6ecb5a1bd3
commit 272081d8cf
3 changed files with 26 additions and 12 deletions
+8 -4
View File
@@ -34,12 +34,16 @@ val Project.intellijRepo get() =
val Project.internalBootstrapRepo: String? get() =
when {
bootstrapKotlinRepo?.startsWith("https://buildserver.labs.intellij.net") == true ->
bootstrapKotlinRepo?.startsWith("https://buildserver.labs.intellij.net") == true
|| bootstrapKotlinRepo?.startsWith("https://teamcity.jetbrains.com") == true ->
bootstrapKotlinRepo!!.replace("artifacts/content/maven", "artifacts/content/internal/repo")
else -> "https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_KotlinPublic_Aggregate),number:$bootstrapKotlinVersion," +
"branch:default:any/artifacts/content/internal/repo/"
}
project.kotlinBuildProperties.isJpsBuildEnabled ->
"https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_KotlinPublic_Aggregate)," +
"number:$bootstrapKotlinVersion,branch:default:any/artifacts/content/internal/repo/"
else -> null
}
fun Project.commonDep(coord: String): String {
val parts = coord.split(':')