From d08d9fce9997d7f717f9ca8ccc974cd9ae825f49 Mon Sep 17 00:00:00 2001
From: "aleksei.plate" <aleksei.plate@TeamCity>
Date: Mon, 19 Oct 2020 08:48:07 +0000
Subject: [PATCH] TeamCity change in 'IntelliJ IDEA plugins / IdeaVim' project:
 Synchronization with own VCS root is enabled

---
 .teamcity/_Self/Project.kt                    |  71 ++++++++++++
 .teamcity/_Self/buildTypes/Build.kt           |  74 +++++++++++++
 .teamcity/_Self/buildTypes/Deploy.kt          |  36 ++++++
 .../_Self/buildTypes/GitHubPullRequests.kt    |  73 ++++++++++++
 .teamcity/_Self/buildTypes/Nvim.kt            |  49 +++++++++
 .../_Self/buildTypes/TestsForIntelliJ20181.kt |  42 +++++++
 .../_Self/buildTypes/TestsForIntelliJ20182.kt |  42 +++++++
 .../_Self/buildTypes/TestsForIntelliJ20183.kt |  43 ++++++++
 .../_Self/buildTypes/TestsForIntelliJ20191.kt |  43 ++++++++
 .../_Self/buildTypes/TestsForIntelliJ20192.kt |  43 ++++++++
 .../_Self/buildTypes/TestsForIntelliJ20193.kt |  43 ++++++++
 .../_Self/buildTypes/TestsForIntelliJ20201.kt |  41 +++++++
 .../buildTypes/TestsForIntelliJ20202_2.kt     |  41 +++++++
 .../_Self/buildTypes/TestsForIntelliJEAP.kt   |  41 +++++++
 ...HttpsGithubComJetBrainsIdeavimBranch183.kt |  11 ++
 ...psGithubComJetBrainsIdeavimBranch191193.kt |  11 ++
 ...ttpsGithubComJetBrainsIdeavimBranchNvim.kt |  10 ++
 ...psGithubComJetBrainsIdeavimPullRequests.kt |  13 +++
 .../HttpsGithubComJetBrainsIdeavim_181.kt     |  11 ++
 .teamcity/pom.xml                             | 104 ++++++++++++++++++
 .teamcity/settings.kts                        |  33 ++++++
 21 files changed, 875 insertions(+)
 create mode 100644 .teamcity/_Self/Project.kt
 create mode 100644 .teamcity/_Self/buildTypes/Build.kt
 create mode 100644 .teamcity/_Self/buildTypes/Deploy.kt
 create mode 100644 .teamcity/_Self/buildTypes/GitHubPullRequests.kt
 create mode 100644 .teamcity/_Self/buildTypes/Nvim.kt
 create mode 100644 .teamcity/_Self/buildTypes/TestsForIntelliJ20181.kt
 create mode 100644 .teamcity/_Self/buildTypes/TestsForIntelliJ20182.kt
 create mode 100644 .teamcity/_Self/buildTypes/TestsForIntelliJ20183.kt
 create mode 100644 .teamcity/_Self/buildTypes/TestsForIntelliJ20191.kt
 create mode 100644 .teamcity/_Self/buildTypes/TestsForIntelliJ20192.kt
 create mode 100644 .teamcity/_Self/buildTypes/TestsForIntelliJ20193.kt
 create mode 100644 .teamcity/_Self/buildTypes/TestsForIntelliJ20201.kt
 create mode 100644 .teamcity/_Self/buildTypes/TestsForIntelliJ20202_2.kt
 create mode 100644 .teamcity/_Self/buildTypes/TestsForIntelliJEAP.kt
 create mode 100644 .teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavimBranch183.kt
 create mode 100644 .teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavimBranch191193.kt
 create mode 100644 .teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavimBranchNvim.kt
 create mode 100644 .teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavimPullRequests.kt
 create mode 100644 .teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavim_181.kt
 create mode 100644 .teamcity/pom.xml
 create mode 100644 .teamcity/settings.kts

diff --git a/.teamcity/_Self/Project.kt b/.teamcity/_Self/Project.kt
new file mode 100644
index 000000000..e3c8a2b32
--- /dev/null
+++ b/.teamcity/_Self/Project.kt
@@ -0,0 +1,71 @@
+package _Self
+
+import _Self.buildTypes.*
+import _Self.vcsRoots.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.Project
+
+object Project : Project({
+    description = "Vim emulation plugin for the IntelliJ platform products"
+
+    vcsRoot(HttpsGithubComJetBrainsIdeavimBranch183)
+    vcsRoot(HttpsGithubComJetBrainsIdeavim_181)
+    vcsRoot(HttpsGithubComJetBrainsIdeavimPullRequests)
+    vcsRoot(HttpsGithubComJetBrainsIdeavimBranch191193)
+    vcsRoot(HttpsGithubComJetBrainsIdeavimBranchNvim)
+
+    buildType(GitHubPullRequests)
+    buildType(Deploy)
+    buildType(TestsForIntelliJ20201)
+    buildType(TestsForIntelliJ20191)
+    buildType(TestsForIntelliJ20181)
+    buildType(TestsForIntelliJ20192)
+    buildType(TestsForIntelliJ20182)
+    buildType(TestsForIntelliJ20193)
+    buildType(TestsForIntelliJ20183)
+    buildType(Nvim)
+    buildType(Build)
+    buildType(TestsForIntelliJ20202_2)
+    buildType(TestsForIntelliJEAP)
+
+    features {
+        feature {
+            id = "PROJECT_EXT_768"
+            type = "CloudImage"
+            param("use-spot-instances", "true")
+            param("user-tags", "project=idea-vim")
+            param("agent_pool_id", "41")
+            param("image-instances-limit", "")
+            param("subnet-id", "subnet-58839511")
+            param("ebs-optimized", "false")
+            param("instance-type", "c5d.large")
+            param("amazon-id", "ami-0d1a6a32faa92923e")
+            param("spot-instance-price", "0.1")
+            param("source-id", "BuildAgentsIdeaVim")
+            param("image-name-prefix", "BuildAgentsIdeaVim")
+            param("key-pair-name", "teamcity-prod-pub")
+            param("security-group-ids", "sg-eda08696,sg-7332cf0f,")
+            param("profileId", "amazon-48")
+        }
+        feature {
+            id = "amazon-48"
+            type = "CloudProfile"
+            param("profileServerUrl", "")
+            param("secure:access-id", "credentialsJSON:dbcdb2a2-de5f-4bc9-9421-292b19e83947")
+            param("system.cloud.profile_id", "amazon-48")
+            param("total-work-time", "")
+            param("description", "")
+            param("cloud-code", "amazon")
+            param("enabled", "true")
+            param("max-running-instances", "10")
+            param("agentPushPreset", "")
+            param("profileId", "amazon-48")
+            param("name", "Cloud Agents")
+            param("next-hour", "")
+            param("secure:secret-key", "credentialsJSON:65a87fe7-0977-4af9-96f1-344f2b82d269")
+            param("region", "eu-west-1")
+            param("terminate-idle-time", "15")
+            param("not-checked", "")
+        }
+    }
+})
diff --git a/.teamcity/_Self/buildTypes/Build.kt b/.teamcity/_Self/buildTypes/Build.kt
new file mode 100644
index 000000000..0fb6a813a
--- /dev/null
+++ b/.teamcity/_Self/buildTypes/Build.kt
@@ -0,0 +1,74 @@
+package _Self.buildTypes
+
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.vcsLabeling
+import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
+import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.ScheduleTrigger
+import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.schedule
+
+object Build : BuildType({
+    name = "Publish EAP Build"
+    description = "Build and publish EAP of IdeaVim plugin"
+
+    artifactRules = "build/distributions/*"
+    buildNumberPattern = "0.60.%build.counter%"
+
+    params {
+        param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.2")
+        password("env.ORG_GRADLE_PROJECT_publishToken", "credentialsJSON:ec1dc748-e289-47e1-88b6-f193d7999bf4", label = "Token")
+        param("env.ORG_GRADLE_PROJECT_publishUsername", "vlan")
+        param("env.ORG_GRADLE_PROJECT_version", "%build.number%")
+        param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
+        param("env.ORG_GRADLE_PROJECT_publishChannels", "eap")
+        password("env.ORG_GRADLE_PROJECT_slackUrl", "credentialsJSON:a8ab8150-e6f8-4eaf-987c-bcd65eac50b5", label = "Slack Token")
+    }
+
+    vcs {
+        root(DslContext.settingsRoot)
+
+        checkoutMode = CheckoutMode.ON_SERVER
+    }
+
+    steps {
+        gradle {
+            tasks = "clean publishPlugin slackEapNotification"
+            buildFile = ""
+            enableStacktrace = true
+            param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
+        }
+    }
+
+    triggers {
+        schedule {
+            enabled = false
+            schedulingPolicy = daily {
+                hour = 22
+            }
+            branchFilter = ""
+            triggerBuild = onWatchedBuildChange {
+                buildType = "IdeaVim_TestsForIntelliJBranch146"
+                watchedBuildRule = ScheduleTrigger.WatchedBuildRule.LAST_SUCCESSFUL
+                watchedBuildBranchFilter = "<default>"
+                promoteWatchedBuild = false
+            }
+        }
+    }
+
+    features {
+        vcsLabeling {
+            vcsRootId = "__ALL__"
+            labelingPattern = "EAP-%system.build.number%"
+            successfulOnly = true
+            branchFilter = ""
+        }
+    }
+
+    dependencies {
+        snapshot(TestsForIntelliJ20192) {
+        }
+        snapshot(TestsForIntelliJ20193) {
+        }
+        snapshot(TestsForIntelliJ20201) {
+        }
+    }
+})
diff --git a/.teamcity/_Self/buildTypes/Deploy.kt b/.teamcity/_Self/buildTypes/Deploy.kt
new file mode 100644
index 000000000..8381ac566
--- /dev/null
+++ b/.teamcity/_Self/buildTypes/Deploy.kt
@@ -0,0 +1,36 @@
+package _Self.buildTypes
+
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
+
+object Deploy : BuildType({
+    name = "Publish Release"
+    description = "Build and publish IdeaVim plugin"
+
+    artifactRules = "build/distributions/*"
+    buildNumberPattern = "0.60"
+
+    params {
+        param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.2")
+        password("env.ORG_GRADLE_PROJECT_publishToken", "credentialsJSON:ec1dc748-e289-47e1-88b6-f193d7999bf4", label = "Password")
+        param("env.ORG_GRADLE_PROJECT_publishUsername", "vlan")
+        param("env.ORG_GRADLE_PROJECT_version", "%build.number%")
+        param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
+        param("env.ORG_GRADLE_PROJECT_publishChannels", "default,eap")
+    }
+
+    vcs {
+        root(DslContext.settingsRoot)
+
+        checkoutMode = CheckoutMode.ON_SERVER
+    }
+
+    steps {
+        gradle {
+            tasks = "clean publishPlugin"
+            buildFile = ""
+            enableStacktrace = true
+            param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
+        }
+    }
+})
diff --git a/.teamcity/_Self/buildTypes/GitHubPullRequests.kt b/.teamcity/_Self/buildTypes/GitHubPullRequests.kt
new file mode 100644
index 000000000..021b5029a
--- /dev/null
+++ b/.teamcity/_Self/buildTypes/GitHubPullRequests.kt
@@ -0,0 +1,73 @@
+package _Self.buildTypes
+
+import _Self.vcsRoots.HttpsGithubComJetBrainsIdeavimPullRequests
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.PullRequests
+import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.commitStatusPublisher
+import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.pullRequests
+import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
+import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.VcsTrigger
+import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
+
+object GitHubPullRequests : BuildType({
+    name = "GitHub Pull Requests"
+    description = "Test GitHub pull requests"
+
+    params {
+        param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
+        param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.1")
+        param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
+    }
+
+    vcs {
+        root(_Self.vcsRoots.HttpsGithubComJetBrainsIdeavimPullRequests)
+
+        checkoutMode = CheckoutMode.ON_SERVER
+        branchFilter = """
+            +:*
+            -:<default>
+        """.trimIndent()
+    }
+
+    steps {
+        gradle {
+            tasks = "clean test"
+            buildFile = ""
+            enableStacktrace = true
+            param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
+        }
+    }
+
+    triggers {
+        vcs {
+            quietPeriodMode = VcsTrigger.QuietPeriodMode.USE_DEFAULT
+            branchFilter = ""
+        }
+    }
+
+    features {
+        pullRequests {
+            provider = github {
+                authType = token {
+                    token = "credentialsJSON:43afd6e5-6ad5-4d12-a218-cf1547717a7f"
+                }
+                filterTargetBranch = "refs/heads/master"
+                filterAuthorRole = PullRequests.GitHubRoleFilter.EVERYBODY
+            }
+        }
+        commitStatusPublisher {
+            vcsRootExtId = "${HttpsGithubComJetBrainsIdeavimPullRequests.id}"
+            publisher = github {
+                githubUrl = "https://api.github.com"
+                authType = personalToken {
+                    token = "credentialsJSON:43afd6e5-6ad5-4d12-a218-cf1547717a7f"
+                }
+            }
+            param("github_oauth_user", "AlexPl292")
+        }
+    }
+
+    requirements {
+        noLessThanVer("teamcity.agent.jvm.version", "1.8")
+    }
+})
diff --git a/.teamcity/_Self/buildTypes/Nvim.kt b/.teamcity/_Self/buildTypes/Nvim.kt
new file mode 100644
index 000000000..18180d092
--- /dev/null
+++ b/.teamcity/_Self/buildTypes/Nvim.kt
@@ -0,0 +1,49 @@
+package _Self.buildTypes
+
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
+import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.script
+import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
+
+object Nvim : BuildType({
+    name = "NVIM"
+    description = "branch EAP"
+
+    params {
+        param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
+        param("env.ORG_GRADLE_PROJECT_ideaVersion", "LATEST-EAP-SNAPSHOT")
+        param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
+    }
+
+    vcs {
+        root(_Self.vcsRoots.HttpsGithubComJetBrainsIdeavimBranchNvim)
+
+        checkoutMode = CheckoutMode.ON_SERVER
+    }
+
+    steps {
+        script {
+            scriptContent = "apt-get install neovim"
+        }
+        gradle {
+            tasks = "--version"
+            param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
+        }
+        gradle {
+            tasks = "clean test"
+            buildFile = ""
+            enableStacktrace = true
+            param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
+        }
+    }
+
+    triggers {
+        vcs {
+            branchFilter = ""
+        }
+    }
+
+    requirements {
+        noLessThanVer("teamcity.agent.jvm.version", "1.8")
+    }
+})
diff --git a/.teamcity/_Self/buildTypes/TestsForIntelliJ20181.kt b/.teamcity/_Self/buildTypes/TestsForIntelliJ20181.kt
new file mode 100644
index 000000000..47f6a1b7e
--- /dev/null
+++ b/.teamcity/_Self/buildTypes/TestsForIntelliJ20181.kt
@@ -0,0 +1,42 @@
+package _Self.buildTypes
+
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
+import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
+
+object TestsForIntelliJ20181 : BuildType({
+    name = "Tests for IntelliJ 2018.1"
+    description = "branch 181"
+
+    params {
+        param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
+        param("env.ORG_GRADLE_PROJECT_ideaVersion", "IC-2018.1")
+        param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
+        param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
+    }
+
+    vcs {
+        root(_Self.vcsRoots.HttpsGithubComJetBrainsIdeavim_181)
+
+        checkoutMode = CheckoutMode.ON_SERVER
+    }
+
+    steps {
+        gradle {
+            tasks = "clean test"
+            buildFile = ""
+            enableStacktrace = true
+            param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
+        }
+    }
+
+    triggers {
+        vcs {
+            branchFilter = ""
+        }
+    }
+
+    requirements {
+        noLessThanVer("teamcity.agent.jvm.version", "1.8")
+    }
+})
diff --git a/.teamcity/_Self/buildTypes/TestsForIntelliJ20182.kt b/.teamcity/_Self/buildTypes/TestsForIntelliJ20182.kt
new file mode 100644
index 000000000..f5e3ade3f
--- /dev/null
+++ b/.teamcity/_Self/buildTypes/TestsForIntelliJ20182.kt
@@ -0,0 +1,42 @@
+package _Self.buildTypes
+
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
+import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
+
+object TestsForIntelliJ20182 : BuildType({
+    name = "Tests for IntelliJ 2018.2"
+    description = "branch 182"
+
+    params {
+        param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
+        param("env.ORG_GRADLE_PROJECT_ideaVersion", "IC-2018.2")
+        param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
+        param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
+    }
+
+    vcs {
+        root(_Self.vcsRoots.HttpsGithubComJetBrainsIdeavim_181)
+
+        checkoutMode = CheckoutMode.ON_SERVER
+    }
+
+    steps {
+        gradle {
+            tasks = "clean test"
+            buildFile = ""
+            enableStacktrace = true
+            param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
+        }
+    }
+
+    triggers {
+        vcs {
+            branchFilter = ""
+        }
+    }
+
+    requirements {
+        noLessThanVer("teamcity.agent.jvm.version", "1.8")
+    }
+})
diff --git a/.teamcity/_Self/buildTypes/TestsForIntelliJ20183.kt b/.teamcity/_Self/buildTypes/TestsForIntelliJ20183.kt
new file mode 100644
index 000000000..d9b8a6613
--- /dev/null
+++ b/.teamcity/_Self/buildTypes/TestsForIntelliJ20183.kt
@@ -0,0 +1,43 @@
+package _Self.buildTypes
+
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
+import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
+
+object TestsForIntelliJ20183 : BuildType({
+    name = "Tests for IntelliJ 2018.3"
+    description = "branch 183"
+
+    params {
+        param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
+        param("env.ORG_GRADLE_PROJECT_legacyNoJavaPlugin", "true")
+        param("env.ORG_GRADLE_PROJECT_ideaVersion", "IC-2018.3")
+        param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
+        param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
+    }
+
+    vcs {
+        root(_Self.vcsRoots.HttpsGithubComJetBrainsIdeavimBranch183)
+
+        checkoutMode = CheckoutMode.ON_SERVER
+    }
+
+    steps {
+        gradle {
+            tasks = "clean test"
+            buildFile = ""
+            enableStacktrace = true
+            param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
+        }
+    }
+
+    triggers {
+        vcs {
+            branchFilter = ""
+        }
+    }
+
+    requirements {
+        noLessThanVer("teamcity.agent.jvm.version", "1.8")
+    }
+})
diff --git a/.teamcity/_Self/buildTypes/TestsForIntelliJ20191.kt b/.teamcity/_Self/buildTypes/TestsForIntelliJ20191.kt
new file mode 100644
index 000000000..e2d0e52ac
--- /dev/null
+++ b/.teamcity/_Self/buildTypes/TestsForIntelliJ20191.kt
@@ -0,0 +1,43 @@
+package _Self.buildTypes
+
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
+import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
+
+object TestsForIntelliJ20191 : BuildType({
+    name = "Tests for IntelliJ 2019.1"
+    description = "branch 191"
+
+    params {
+        param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
+        param("env.ORG_GRADLE_PROJECT_legacyNoJavaPlugin", "true")
+        param("env.ORG_GRADLE_PROJECT_ideaVersion", "IC-2019.1")
+        param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
+        param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
+    }
+
+    vcs {
+        root(_Self.vcsRoots.HttpsGithubComJetBrainsIdeavimBranch191193)
+
+        checkoutMode = CheckoutMode.ON_SERVER
+    }
+
+    steps {
+        gradle {
+            tasks = "clean test"
+            buildFile = ""
+            enableStacktrace = true
+            param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
+        }
+    }
+
+    triggers {
+        vcs {
+            branchFilter = ""
+        }
+    }
+
+    requirements {
+        noLessThanVer("teamcity.agent.jvm.version", "1.8")
+    }
+})
diff --git a/.teamcity/_Self/buildTypes/TestsForIntelliJ20192.kt b/.teamcity/_Self/buildTypes/TestsForIntelliJ20192.kt
new file mode 100644
index 000000000..acb87b193
--- /dev/null
+++ b/.teamcity/_Self/buildTypes/TestsForIntelliJ20192.kt
@@ -0,0 +1,43 @@
+package _Self.buildTypes
+
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
+import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
+
+object TestsForIntelliJ20192 : BuildType({
+    name = "Tests for IntelliJ 2019.2"
+    description = "branch 192"
+
+    params {
+        param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
+        param("env.ORG_GRADLE_PROJECT_legacyNoJavaPlugin", "false")
+        param("env.ORG_GRADLE_PROJECT_ideaVersion", "IC-2019.2")
+        param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
+        param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
+    }
+
+    vcs {
+        root(_Self.vcsRoots.HttpsGithubComJetBrainsIdeavimBranch191193)
+
+        checkoutMode = CheckoutMode.ON_SERVER
+    }
+
+    steps {
+        gradle {
+            tasks = "clean test"
+            buildFile = ""
+            enableStacktrace = true
+            param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
+        }
+    }
+
+    triggers {
+        vcs {
+            branchFilter = ""
+        }
+    }
+
+    requirements {
+        noLessThanVer("teamcity.agent.jvm.version", "1.8")
+    }
+})
diff --git a/.teamcity/_Self/buildTypes/TestsForIntelliJ20193.kt b/.teamcity/_Self/buildTypes/TestsForIntelliJ20193.kt
new file mode 100644
index 000000000..48225b6ee
--- /dev/null
+++ b/.teamcity/_Self/buildTypes/TestsForIntelliJ20193.kt
@@ -0,0 +1,43 @@
+package _Self.buildTypes
+
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
+import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
+
+object TestsForIntelliJ20193 : BuildType({
+    name = "Tests for IntelliJ 2019.3"
+    description = "branch 193"
+
+    params {
+        param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
+        param("env.ORG_GRADLE_PROJECT_legacyNoJavaPlugin", "false")
+        param("env.ORG_GRADLE_PROJECT_ideaVersion", "2019.3")
+        param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
+        param("env.ORG_GRADLE_PROJECT_javaVersion", "1.8")
+    }
+
+    vcs {
+        root(_Self.vcsRoots.HttpsGithubComJetBrainsIdeavimBranch191193)
+
+        checkoutMode = CheckoutMode.ON_SERVER
+    }
+
+    steps {
+        gradle {
+            tasks = "clean test"
+            buildFile = ""
+            enableStacktrace = true
+            param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
+        }
+    }
+
+    triggers {
+        vcs {
+            branchFilter = ""
+        }
+    }
+
+    requirements {
+        noLessThanVer("teamcity.agent.jvm.version", "1.8")
+    }
+})
diff --git a/.teamcity/_Self/buildTypes/TestsForIntelliJ20201.kt b/.teamcity/_Self/buildTypes/TestsForIntelliJ20201.kt
new file mode 100644
index 000000000..ee3205136
--- /dev/null
+++ b/.teamcity/_Self/buildTypes/TestsForIntelliJ20201.kt
@@ -0,0 +1,41 @@
+package _Self.buildTypes
+
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
+import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
+
+object TestsForIntelliJ20201 : BuildType({
+    name = "Tests for IntelliJ 2020.1"
+    description = "branch 201"
+
+    params {
+        param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
+        param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.1")
+        param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
+    }
+
+    vcs {
+        root(DslContext.settingsRoot)
+
+        checkoutMode = CheckoutMode.ON_SERVER
+    }
+
+    steps {
+        gradle {
+            tasks = "clean test"
+            buildFile = ""
+            enableStacktrace = true
+            param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
+        }
+    }
+
+    triggers {
+        vcs {
+            branchFilter = ""
+        }
+    }
+
+    requirements {
+        noLessThanVer("teamcity.agent.jvm.version", "1.8")
+    }
+})
diff --git a/.teamcity/_Self/buildTypes/TestsForIntelliJ20202_2.kt b/.teamcity/_Self/buildTypes/TestsForIntelliJ20202_2.kt
new file mode 100644
index 000000000..38171a5fc
--- /dev/null
+++ b/.teamcity/_Self/buildTypes/TestsForIntelliJ20202_2.kt
@@ -0,0 +1,41 @@
+package _Self.buildTypes
+
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
+import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
+
+object TestsForIntelliJ20202_2 : BuildType({
+    name = "Tests for IntelliJ 2020.2"
+    description = "branch 202"
+
+    params {
+        param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
+        param("env.ORG_GRADLE_PROJECT_ideaVersion", "2020.2")
+        param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
+    }
+
+    vcs {
+        root(DslContext.settingsRoot)
+
+        checkoutMode = CheckoutMode.ON_SERVER
+    }
+
+    steps {
+        gradle {
+            tasks = "clean test"
+            buildFile = ""
+            enableStacktrace = true
+            param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
+        }
+    }
+
+    triggers {
+        vcs {
+            branchFilter = ""
+        }
+    }
+
+    requirements {
+        noLessThanVer("teamcity.agent.jvm.version", "1.8")
+    }
+})
diff --git a/.teamcity/_Self/buildTypes/TestsForIntelliJEAP.kt b/.teamcity/_Self/buildTypes/TestsForIntelliJEAP.kt
new file mode 100644
index 000000000..4390cd335
--- /dev/null
+++ b/.teamcity/_Self/buildTypes/TestsForIntelliJEAP.kt
@@ -0,0 +1,41 @@
+package _Self.buildTypes
+
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
+import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
+
+object TestsForIntelliJEAP : BuildType({
+    name = "Tests for IntelliJ Latest EAP"
+    description = "branch EAP"
+
+    params {
+        param("env.ORG_GRADLE_PROJECT_downloadIdeaSources", "false")
+        param("env.ORG_GRADLE_PROJECT_ideaVersion", "LATEST-EAP-SNAPSHOT")
+        param("env.ORG_GRADLE_PROJECT_instrumentPluginCode", "false")
+    }
+
+    vcs {
+        root(DslContext.settingsRoot)
+
+        checkoutMode = CheckoutMode.ON_SERVER
+    }
+
+    steps {
+        gradle {
+            tasks = "clean test"
+            buildFile = ""
+            enableStacktrace = true
+            param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
+        }
+    }
+
+    triggers {
+        vcs {
+            branchFilter = ""
+        }
+    }
+
+    requirements {
+        noLessThanVer("teamcity.agent.jvm.version", "1.8")
+    }
+})
diff --git a/.teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavimBranch183.kt b/.teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavimBranch183.kt
new file mode 100644
index 000000000..9408e4e37
--- /dev/null
+++ b/.teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavimBranch183.kt
@@ -0,0 +1,11 @@
+package _Self.vcsRoots
+
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
+
+object HttpsGithubComJetBrainsIdeavimBranch183 : GitVcsRoot({
+    name = "https://github.com/JetBrains/ideavim (branch 183)"
+    url = "https://github.com/JetBrains/ideavim.git"
+    branch = "183"
+    useMirrors = false
+})
diff --git a/.teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavimBranch191193.kt b/.teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavimBranch191193.kt
new file mode 100644
index 000000000..9c58fa278
--- /dev/null
+++ b/.teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavimBranch191193.kt
@@ -0,0 +1,11 @@
+package _Self.vcsRoots
+
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
+
+object HttpsGithubComJetBrainsIdeavimBranch191193 : GitVcsRoot({
+    name = "https://github.com/JetBrains/ideavim (branch 191-193)"
+    url = "https://github.com/JetBrains/ideavim.git"
+    branch = "191-193"
+    useMirrors = false
+})
diff --git a/.teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavimBranchNvim.kt b/.teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavimBranchNvim.kt
new file mode 100644
index 000000000..c7165cc5f
--- /dev/null
+++ b/.teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavimBranchNvim.kt
@@ -0,0 +1,10 @@
+package _Self.vcsRoots
+
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
+
+object HttpsGithubComJetBrainsIdeavimBranchNvim : GitVcsRoot({
+    name = "https://github.com/JetBrains/ideavim (branch nvim)"
+    url = "https://github.com/JetBrains/ideavim.git"
+    branch = "neovim"
+})
diff --git a/.teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavimPullRequests.kt b/.teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavimPullRequests.kt
new file mode 100644
index 000000000..7e2094bc6
--- /dev/null
+++ b/.teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavimPullRequests.kt
@@ -0,0 +1,13 @@
+package _Self.vcsRoots
+
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
+
+object HttpsGithubComJetBrainsIdeavimPullRequests : GitVcsRoot({
+    name = "https://github.com/JetBrains/ideavim (Pull Requests)"
+    url = "https://github.com/JetBrains/ideavim"
+    branchSpec = "+:refs/(pull/*/merge)"
+    authMethod = password {
+        userName = "AlexPl292"
+    }
+})
diff --git a/.teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavim_181.kt b/.teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavim_181.kt
new file mode 100644
index 000000000..7fce589ed
--- /dev/null
+++ b/.teamcity/_Self/vcsRoots/HttpsGithubComJetBrainsIdeavim_181.kt
@@ -0,0 +1,11 @@
+package _Self.vcsRoots
+
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
+
+object HttpsGithubComJetBrainsIdeavim_181 : GitVcsRoot({
+    name = "https://github.com/JetBrains/ideavim (branch 181)"
+    url = "https://github.com/JetBrains/ideavim.git"
+    branch = "181"
+    useMirrors = false
+})
diff --git a/.teamcity/pom.xml b/.teamcity/pom.xml
new file mode 100644
index 000000000..cbcfb0353
--- /dev/null
+++ b/.teamcity/pom.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0"?>
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <name>IdeaVim Config DSL Script</name>
+  <groupId>IdeaVim</groupId>
+  <artifactId>IdeaVim_dsl</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <parent>
+    <groupId>org.jetbrains.teamcity</groupId>
+    <artifactId>configs-dsl-kotlin-parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <repositories>
+    <repository>
+      <id>jetbrains-all</id>
+      <url>https://download.jetbrains.com/teamcity-repository</url>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </repository>
+    <repository>
+      <id>teamcity-server</id>
+      <url>https://teamcity.jetbrains.com/app/dsl-plugins-repository</url>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </repository>
+  </repositories>
+
+  <pluginRepositories>
+    <pluginRepository>
+      <id>JetBrains</id>
+      <url>https://download.jetbrains.com/teamcity-repository</url>
+    </pluginRepository>
+  </pluginRepositories>
+
+  <build>
+    <sourceDirectory>${basedir}</sourceDirectory>
+    <plugins>
+      <plugin>
+        <artifactId>kotlin-maven-plugin</artifactId>
+        <groupId>org.jetbrains.kotlin</groupId>
+        <version>${kotlin.version}</version>
+
+        <configuration/>
+        <executions>
+          <execution>
+            <id>compile</id>
+            <phase>process-sources</phase>
+            <goals>
+              <goal>compile</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>test-compile</id>
+            <phase>process-test-sources</phase>
+            <goals>
+              <goal>test-compile</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.jetbrains.teamcity</groupId>
+        <artifactId>teamcity-configs-maven-plugin</artifactId>
+        <version>${teamcity.dsl.version}</version>
+        <configuration>
+          <format>kotlin</format>
+          <dstDir>target/generated-configs</dstDir>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.jetbrains.teamcity</groupId>
+      <artifactId>configs-dsl-kotlin</artifactId>
+      <version>${teamcity.dsl.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jetbrains.teamcity</groupId>
+      <artifactId>configs-dsl-kotlin-plugins</artifactId>
+      <version>1.0-SNAPSHOT</version>
+      <type>pom</type>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jetbrains.kotlin</groupId>
+      <artifactId>kotlin-stdlib-jdk8</artifactId>
+      <version>${kotlin.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jetbrains.kotlin</groupId>
+      <artifactId>kotlin-script-runtime</artifactId>
+      <version>${kotlin.version}</version>
+      <scope>compile</scope>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file
diff --git a/.teamcity/settings.kts b/.teamcity/settings.kts
new file mode 100644
index 000000000..132073daa
--- /dev/null
+++ b/.teamcity/settings.kts
@@ -0,0 +1,33 @@
+import jetbrains.buildServer.configs.kotlin.v2019_2.*
+
+/*
+The settings script is an entry point for defining a single
+TeamCity project. TeamCity looks for the 'settings.kts' file in a
+project directory and runs it if it's found, so the script name
+shouldn't be changed and its package should be the same as the
+project's id.
+
+The script should contain a single call to the project() function
+with a Project instance or an init function as an argument.
+
+VcsRoots, BuildTypes, and Templates of this project must be
+registered inside project using the vcsRoot(), buildType(), and
+template() methods respectively.
+
+Subprojects can be defined either in their own settings.kts or by
+calling the subProjects() method in this project.
+
+To debug settings scripts in command-line, run the
+
+    mvnDebug org.jetbrains.teamcity:teamcity-configs-maven-plugin:generate
+
+command and attach your debugger to the port 8000.
+
+To debug in IntelliJ Idea, open the 'Maven Projects' tool window (View ->
+Tool Windows -> Maven Projects), find the generate task
+node (Plugins -> teamcity-configs -> teamcity-configs:generate),
+the 'Debug' option is available in the context menu for the task.
+*/
+
+version = "2020.1"
+project(_Self.Project)
\ No newline at end of file