From 43e61067915225387cb5e67297b2bf8af0b34ce9 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Tue, 10 Oct 2017 08:10:27 +0300 Subject: [PATCH] Bootstrap selection: allow to specify teamcity project with a parameter --- buildSrc/src/main/kotlin/Bootstrap.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/buildSrc/src/main/kotlin/Bootstrap.kt b/buildSrc/src/main/kotlin/Bootstrap.kt index 5af4e03d868..886a031a5a2 100644 --- a/buildSrc/src/main/kotlin/Bootstrap.kt +++ b/buildSrc/src/main/kotlin/Bootstrap.kt @@ -12,14 +12,15 @@ var Project.bootstrapKotlinRepo: String? private set(value) { this.extra["bootstrapKotlinRepo"] = value } fun Project.kotlinBootstrapFrom(defaultSource: BootstrapOption) { - val bootstrapVersion = project.findProperty("bootstrap.kotlin.version") as String? - val bootstrapRepo = project.findProperty("bootstrap.kotlin.repo") as String? - val bootstrapTeamCityVersion = project.findProperty("bootstrap.teamcity.kotlin.version") as String? + val customVersion = project.findProperty("bootstrap.kotlin.version") as String? + val customRepo = project.findProperty("bootstrap.kotlin.repo") as String? + val teamCityVersion = project.findProperty("bootstrap.teamcity.kotlin.version") as String? + val teamCityProject = project.findProperty("bootstrap.teamcity.project") as String? val bootstrapSource = when { project.hasProperty("bootstrap.local") -> BootstrapOption.Local(project.findProperty("bootstrap.local.version") as String?, project.findProperty("bootstrap.local.path") as String?) - bootstrapTeamCityVersion != null -> BootstrapOption.TeamCity(bootstrapTeamCityVersion, onlySuccessBootstrap = false) - bootstrapVersion != null -> BootstrapOption.Custom(kotlinVersion = bootstrapVersion, repo = bootstrapRepo) + teamCityVersion != null -> BootstrapOption.TeamCity(teamCityVersion, projectExtId = teamCityProject, onlySuccessBootstrap = false) + customVersion != null -> BootstrapOption.Custom(kotlinVersion = customVersion, repo = customRepo) else -> defaultSource }