Splitting TeamCity Kotlin into multiple files and subfolders

Answered
What a good practice? Maybe there are some examples for big projects? How to separate project with subfolders?
7 comments
Comment actions Permalink

Hi M Rublev,

When a project becomes large enough, TeamCity will automatically split it into multiple files and subfolders. Below you can see an example of my test project's structure. 

You can see the '_Self' package that contains the original project where I have versioned settings enabled on the screenshot. It has its 'Project.kt' file that describes the entire project and multiple Kotlin objects in corresponding packages that describe VCS Roots and Build Configurations (buildTypes). You can also see multiple subprojects with a similar structure.

Keep in mind that you don't have to follow this particular style. You can create your own structure. Just make sure to correctly import everything from the corresponding packages (see the highlight in the imports section).

1
Comment actions Permalink

Can I build same structure folder with Kotlin DSL?



0
Comment actions Permalink

Sure, this structure doesn't conflict with my above example. But again, you can use any structure you like. Just don't forget to import everything you need from the corresponding places.

1
Comment actions Permalink

Thank you, maybe there some examples on GitHub?

0
Comment actions Permalink

We don't have anything like that, unfortunately. But you can start by checking Kotlin DSL documentation here: https://www.jetbrains.com/help/teamcity/kotlin-dsl.html

And also, you can check Kotlin DSL docs on your TeamCity server by accessing this endpoint /app/dsl-documentation/index.html on it.

0
Comment actions Permalink

Ok, thank you for help!

0
Comment actions Permalink

Happy to help :) 

0

Please sign in to leave a comment.