Icon

You are viewing the documentation of TeamCity 10.x and 2017.x, which is not the most recently released version of TeamCity.
View this page in the latest documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

 

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To start working with Kotlin DSL, go to the project settings page, click the Actions menu and select Download settings in kotlin format, the option available since TeamCity 10.0.3. This will generate a .zip archive with project settings which can be used in your sandbox project.

...

  1. Enable versioned settings for your project.
  2. Select kotlin as the format.
  3. Commit the settings to your version control.  

    Note

    Prior to TeamCity 2017.2, as soon as a project is switched to Kotlin, editing of its settings is disabled in the UI (except a few pages: Versioned settings, Maven Settings, SSH keys and Meta-runners).  If you need to enable editing, switch versioned settings to XML format or disable versioned settings.

    Since TeamCity 2017.2, project and build configuration settings will be available for editing from the web UI. See details in the section above.

  4. Once you apply the versioned settings to your project, TeamCity will generate necessary Kotlin files for this project and check them in to the specified repository under the .teamcity directory. If this repository already contains project settings in the XML format, they will be preserved, but TeamCity will no longer use them:  once you get familiar with Kotlin files, these xml files can be removed.

...

You can create a new project via DSL inside a parent project which already has uses settings in the Kotlin format. A new project can be added either in its own directory with settings.kts or using the subProject() method in the parent project. 

...

 

Note

Prior to TeamCity 2017.2, no external resources are supported and since pom.xml is not used on the server, any libraries that you might want to add will be ignored during DSL processing. 

Since TeamCity 2017.2, it is possible to use external libraries in your Kotlin DSL code. See details the section above.

TeamCity will apply the changes to  configuration as follows: 

...