Effective Kotlin: Item 5 — Prefer dependency injection to hardwiring resources

Joshua details the reasons why dependency injection matters in his book Effective Java and although not covered in detail mentions the use of some famous frameworks to tidy up the “clutter” of doing dependency injection yourself.

Implementing dependency injection by hand in Kotlin is no different than in Java, for example with the dependencies passed in through the constructor or setters of your objects.