The documentation provides useful setup information but lacks a good DSL reference like the Gradle DSL reference.
Using the DSL to create projects and build configurations is very flexible as shown by the different approaches
I took to create multiple build configurations. I’m sure one or more of them could be used to setup multiple projects
and possibly hundreds of build configurations.
Due to the lack of a good DSL reference the development cycle for creating and editing settings will require using
the TeamCity UI to configure a project or build configuration and to then export it in Kotlin format.
I imagine that creating build configurations targeting different platforms, build tools or version control systems
will have some of the same problems I’ve encountered above and possibly others.
A comment in my previous post describes how the code completion menu offers too many options, this was due to
the approach I took of moving all the code into the settings.kts
file. I’m guessing most of the DSL API is in scope
making it more difficult to choose a valid, in scope, method or field. I discovered this after introducing the
functions to create a build type and configure it, within the functions there was less API options.
Hopefully this post and the previous post have provided some ideas on how to use
TeamCity’s Kotlin DSL.