Best practice for VCS root with Kotlin and source code repo


Background: I have a Git repository that hosts my applications source code as well as the Kotlin files for the TeamCity pipeline. So far, I only have a single VCS root set up when creating the project in TeamCity and from the Kotlin files, if I require to reference that VCS root, I use `"${}"` and that works fine. I noticed that TeamCity only picks up build configuration changes when the code changes to Kotlin files are merged to the main branch and not from feature branches - which is what I'd expect.

From what I've heard, I should be creating and using a VCS root in the Kotlin file only if I'm storing the Kotlin files in one repo and the applications source code in another repo.

Question: Is setting up and using a single VCS root, in this case, the best practice? Or would you recommend using two VCS roots - one while creating the project which monitors Kotlin changes and the other in Kotlin code that is used by the build configurations? 


Please sign in to leave a comment.