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
+18 -3
View File
@@ -421,9 +421,24 @@ allprojects {
kotlinBuildLocalRepo(project)
mirrorRepo?.let(::maven)
internalBootstrapRepo?.let(::maven)
bootstrapKotlinRepo?.let(::maven)
maven(protobufRepo)
internalBootstrapRepo?.let(::maven)?.apply {
content {
includeGroup("org.jetbrains.kotlin")
}
}
bootstrapKotlinRepo?.let(::maven)?.apply {
content {
includeGroup("org.jetbrains.kotlin")
}
}
maven(protobufRepo) {
content {
includeModule("org.jetbrains.kotlin", "protobuf-lite")
includeModule("org.jetbrains.kotlin", "protobuf-relocated")
}
}
maven(intellijRepo)
+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(':')
@@ -17,11 +17,6 @@ var Project.bootstrapKotlinRepo: String?
extensions.extraProperties.set("bootstrapKotlinRepo", value)
}
@Deprecated("Obsolete, use internalBootstrapRepo instead.")
val Project.internalKotlinRepo: String?
get() = "https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_KotlinPublic_Aggregate),number:$bootstrapKotlinVersion," +
"branch:default:any/artifacts/content/internal/repo"
fun Project.kotlinBootstrapFrom(defaultSource: BootstrapOption) {
val teamCityBootstrapVersion = kotlinBuildProperties.teamCityBootstrapVersion
val customBootstrapVersion = kotlinBuildProperties.customBootstrapVersion