anchor.diff:  
   The server plugin can be combined with the agent plugin in the same project but not with the Java Plugin.
   
  -=== TeamCity Server Plugin Configuration
  +==== Configuration
   
   The following properties can be defined in the `server` configuration block.
   
  
positive.code: 
      fun Project.teamcity(configuration: TeamCityPluginExtension.() -> Unit) {
          configure(configuration)
      }
  ----
  
  === TeamCity Agent Plugin
  
  The plugin when applied with the Java Plugin, adds the JetBrains Maven repository and adds the TeamCity `agent-api` and
  `tests-support` dependencies to the `compile` and `testCompile` configurations. If the Java Plugin is not applied the plugin
  provides only the tasks to package the agent side plugin archive if a plugin descriptor is defined.
  
  === TeamCity Agent Plugin Configuration
  
  The following properties can be defined in the `agent` configuration block.
  
  * `descriptor` : The plugin descriptor, the descriptor can be defined within the build script or reference an external file.
  * `tokens` : The tokens property is a map of tokens to be replaced in the descriptor file with values. This only applies
  if the descriptor is referencing an external file.
  * `files` : The files property is a CopySpec that defines additional files to be included in the plugin archive.
  * `archiveName` : The archiveName property defines the name of the plugin archive output by the `agentPlugin` task.
  Defaults to the name of the root project with '-agent' appended and the project version.
  
  The plugin descriptor properties are shown in the examples below and described in the TeamCity documentation for
  {uri-agent-descriptor}[Agent-Side Plugin Descriptor]
  
  === TeamCity Agent Plugin Tasks
  
  * `agentPlugin` : Builds and packages the agent side of a TeamCity plugin. The artifacts defined on the 'agent'
   configuration are added to the lib directory of the agent plugin archive.  The task performs validation of the plugin
   descriptor and outputs a warning if a required value is missing.
  * `generateAgentDescriptor` : If the descriptor is defined in the build script this task is enabled and will
  output the descriptor to the build directory.
  * `processAgentDescriptor` : If the descriptor is defined as an external file this task will copy the file to the build
  directory. ('build/descriptor/agent')
  
  The plugin enhances the `jar` task to perform validation of the bean definition file and outputs a warning if
  no beans are defined or if a class is missing from the jar file.
  
  === Examples
  
  Agent side plugin descriptor
  
  [source,groovy]
  [subs="attributes"]
  ----
      teamcity {
          version = teamcityVersion
  
          agent {
              descriptor {
                  pluginDeployment {
                      useSeparateClassloader = false
                      executableFiles {
                          include 'file1'
                          include 'file2'
                      }
                  }
                  dependencies {
                      plugin 'plugin-name'
                      tool 'tool-name'
                  }
              }
          }
      }
  ----
  
  Agent tool descriptor
  
  [source,groovy]
  [subs="attributes"]
  ----
      teamcity {
          version = teamcityVersion
  
          agent {
              descriptor {
                  toolDeployment {
                      executableFiles {
                          include 'tooldir/file1'
                          include 'tooldir/file2'
                      }
                  }
                  dependencies {
                      plugin 'plugin-name'
                      tool 'tool-name'
                  }
              }
  
              // Additional files can be included in the agent plugin archive using the files configuration block
              files {
                  into('tooldir') {
                      from('tooldir')
                  }
              }
          }
      }
  ----
  
  The following example uses the Kotlin DSL.
  
  [source,groovy]
  [subs="attributes"]
  .build.gradle.kts
  ----
      extra["teamcityVersion"] = findProperty("teamcity.version") ?: "10.0"
  
      teamcity {
          version = extra["teamcityVersion"] as String
  
          agent {
              descriptor {
                  pluginDeployment {
                      useSeparateClassloader = false
                      executableFiles {
                          include("file1")
                          include("file2")
                      }
                  }
                  dependencies {
                      plugin("plugin-name")
                      tool("tool-name")
                  }
              }
  
              files {
                  into("tooldir") {
                      from("tooldir")
                  }
              }
          }
      }
  ----
  
  
negative.code: 
  It is recommended that the credentials for the JetBrains Plugin Repository are stored in `$HOME/.gradle/gradle.properties`.
  
  === TeamCity Agent Plugin
  
  The plugin when applied with the Java Plugin, adds the JetBrains Maven repository and adds the TeamCity `agent-api` and
  `tests-support` dependencies to the `compile` and `testCompile` configurations. If the Java Plugin is not applied the plugin
  provides only the tasks to package the agent side plugin archive if a plugin descriptor is defined.
  
  ==== Configuration
  
  The following properties can be defined in the `agent` configuration block.
  
  * `descriptor` : The plugin descriptor, the descriptor can be defined within the build script or reference an external file.
  * `tokens` : The tokens property is a map of tokens to be replaced in the descriptor file with values. This only applies
  if the descriptor is referencing an external file.
  * `files` : The files property is a CopySpec that defines additional files to be included in the plugin archive.
  * `archiveName` : The archiveName property defines the name of the plugin archive output by the `agentPlugin` task.
  Defaults to the name of the root project with '-agent' appended and the project version.
  
  The plugin descriptor properties are shown in the examples below and described in the TeamCity documentation for
  {uri-agent-descriptor}[Agent-Side Plugin Descriptor]
  
  ==== Tasks
  
  * `agentPlugin` : Builds and packages the agent side of a TeamCity plugin. The artifacts defined on the 'agent'
   configuration are added to the lib directory of the agent plugin archive.  The task performs validation of the plugin
   descriptor and outputs a warning if a required value is missing.
  * `generateAgentDescriptor` : If the descriptor is defined in the build script this task is enabled and will
  output the descriptor to the build directory.
  * `processAgentDescriptor` : If the descriptor is defined as an external file this task will copy the file to the build
  directory. ('build/descriptor/agent')
  
  The plugin enhances the `jar` task to perform validation of the bean definition file and outputs a warning if
  no beans are defined or if a class is missing from the jar file.
  
  ==== Examples
  
  Agent side plugin descriptor
  
  [source,groovy]
  [subs="attributes"]
  ----
      teamcity {
          version = teamcityVersion
  
          agent {
              descriptor {
                  pluginDeployment {
                      useSeparateClassloader = false
                      executableFiles {
                          include 'file1'
                          include 'file2'
                      }
                  }
                  dependencies {
                      plugin 'plugin-name'
                      tool 'tool-name'
                  }
              }
          }
      }
  ----
  
  Agent tool descriptor
  
  [source,groovy]
  [subs="attributes"]
  ----
      teamcity {
          version = teamcityVersion
  
          agent {
              descriptor {
                  toolDeployment {
                      executableFiles {
                          include 'tooldir/file1'
                          include 'tooldir/file2'
                      }
                  }
                  dependencies {
                      plugin 'plugin-name'
                      tool 'tool-name'
                  }
              }
  
              // Additional files can be included in the agent plugin archive using the files configuration block
              files {
                  into('tooldir') {
                      from('tooldir')
                  }
              }
          }
      }
  ----
  
  The following example uses the Kotlin DSL.
  
  [source,groovy]
  [subs="attributes"]
  .build.gradle.kts
  ----
      extra["teamcityVersion"] = findProperty("teamcity.version") ?: "10.0"
  
      teamcity {
          version = extra["teamcityVersion"] as String
  
          agent {
              descriptor {
                  pluginDeployment {
                      useSeparateClassloader = false
                      executableFiles {
                          include("file1")
                          include("file2")
                      }
                  }
                  dependencies {
                      plugin("plugin-name")
                      tool("tool-name")
                  }
              }
  
              files {
                  into("tooldir") {
                      from("tooldir")
                  }
              }
          }
      }
  ----
  
  === TeamCity Environments Plugin
  
  Applying this plugin provides tasks to download, install, start and stop a TeamCity Server and Build Agent.
  This allows a plugin to be debugged or tested against multiple versions of TeamCity.
  
  ==== Configuration
  
  The environments configuration is available by applying the `com.github.rodm.teamcity-environments` plugin.
  
  The following properties can be defined in the `environments` configuration block.
  
  