To use an external library in your Kotlin DSL code, add a dependency on this library to the .teamcity/pom.xml file in the settings repository and commit this change so that TeamCity detects it. Then, before starting the generation process, the TeamCity server will fetch the necessary dependencies from the Maven repository, compile code with them, and then start the settings generator.
FAQ and Common Problems
Why portable DSL requires the same prefix for all build configuration IDs?
In TeamCity projects, templates, build configurations and VCS roots all have unique IDs. These IDs usually look like:
Administrator's Guide: Storing Project Settings in Version Control