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
+1 -1
View File
@@ -359,7 +359,7 @@ allprojects {
maven("https://jetbrains.bintray.com/intellij-third-party-dependencies")
maven("https://dl.google.com/dl/android/maven2")
bootstrapKotlinRepo?.let(::maven)
internalKotlinRepo?.let(::maven)
internalBootstrapRepo?.let(::maven)
}
configureJvmProject(javaHome!!, jvmTarget!!)
+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) {
@@ -17,6 +17,7 @@ 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_Compiler),number:$bootstrapKotlinVersion," +
"branch:default:any/artifacts/content/internal/repo"