Add a mapping from Interface to Concrete type with Moshi and Kotlin

If you’re using Moshi for your JSON needs, you’ll eventually stumble upon the need to specify the concrete implementation of an interface. For example, you might have a contrived example such as: So how do we make sure the list of mammals in MammalList uses the concrete Human implementation? With a custom adapter! The implementation is simple – we just …

Binding Annotations with Guice and Kotlin

If you’re using kotlin-guice to use Guice with your Kotlin project, you might have run into problems with binding annotations. Annotations let you use a specific implementation of an interface when there are multiple implementations registered with Guice: The problem is Kotlin works slightly differently when it comes to annotations and figuring out how to make it work can be …