Build: Add property for internal kotlin repo

This commit is contained in:
Vyacheslav Gerasimov
2019-05-24 14:48:36 +03:00
parent 2ce961a662
commit 6a38cb050f
2 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -337,13 +337,13 @@ allprojects {
repositories { repositories {
kotlinBuildLocalRepo(project) kotlinBuildLocalRepo(project)
mirrorRepo?.let(::maven) mirrorRepo?.let(::maven)
bootstrapKotlinRepo?.let(::maven)
jcenter() jcenter()
maven(protobufRepo) maven(protobufRepo)
maven(intellijRepo) maven(intellijRepo)
maven("https://dl.bintray.com/kotlin/ktor") maven("https://dl.bintray.com/kotlin/ktor")
maven("https://kotlin.bintray.com/kotlin-dependencies") maven("https://kotlin.bintray.com/kotlin-dependencies")
maven(bootstrapKotlinRepo!!.replace("artifacts/content/maven/", "artifacts/content/internal/repo")) bootstrapKotlinRepo?.let(::maven)
internalKotlinRepo?.let(::maven)
} }
configureJvmProject(javaHome!!, jvmTarget!!) configureJvmProject(javaHome!!, jvmTarget!!)
+4
View File
@@ -7,10 +7,14 @@ import org.gradle.kotlin.dsl.*
var Project.bootstrapKotlinVersion: String var Project.bootstrapKotlinVersion: String
get() = this.property("bootstrapKotlinVersion") as String get() = this.property("bootstrapKotlinVersion") as String
private set(value) { this.extra["bootstrapKotlinVersion"] = value } private set(value) { this.extra["bootstrapKotlinVersion"] = value }
var Project.bootstrapKotlinRepo: String? var Project.bootstrapKotlinRepo: String?
get() = this.property("bootstrapKotlinRepo") as String? get() = this.property("bootstrapKotlinRepo") as String?
private set(value) { this.extra["bootstrapKotlinRepo"] = value } private set(value) { this.extra["bootstrapKotlinRepo"] = value }
val Project.internalKotlinRepo: String?
get() = bootstrapKotlinRepo?.replace("artifacts/content/maven/", "artifacts/content/internal/repo")
fun Project.kotlinBootstrapFrom(defaultSource: BootstrapOption) { fun Project.kotlinBootstrapFrom(defaultSource: BootstrapOption) {
val customVersion = project.findProperty("bootstrap.kotlin.version") as String? val customVersion = project.findProperty("bootstrap.kotlin.version") as String?
val customRepo = project.findProperty("bootstrap.kotlin.repo") as String? val customRepo = project.findProperty("bootstrap.kotlin.repo") as String?