When adding Kotlin to an existing code base, regardless of whether you start with a test-first or feature-first integration of Kotlin, there are certain impacts that will be incurred, including the following:
- Additional complexity
- Additional tooling
- Increased artifact size
- Possibly increased build speed
By adding a new development language to your project, you've increased the number of languages you have to understand in order to be able to work on the entirety of the code base. While this might be a minor cost, it does increase the overall complexity of the project.
Adding Kotlin to your project will likely require additional tooling and dependencies. Again, these increase the complexity of your project. In particular, you may have to pay close attention to make sure that your version of Kotlin and any associated plugins are compatible with your existing tools.
Including Kotlin and the Kotlin standard library will likely increase the size of your output artifact. This is typically a minimal size increase, but if you're working on a project where every byte counts, you may have to consider this cost and how to mitigate it.
Lastly, adding Kotlin to an existing Java project will increase your build time. This increase is even worse if you're using annotation processors. When adding Kotlin to your project for the first time, it may be worth your time to profile your build and determine whether the impacts on build performance are acceptable or not. Now, let's take a step ahead and see how the testing of interop works.