Building Kotlin-first Libraries

Building Kotlin-first Libraries

Originally presented at Kotlin London, March 7th 2024.


Kotlin libraries are often written with Java typing at heart, but what if it didn't need to be that way? What if Java support was an afterthought? Join us to learn the story of how we designed strongly-typed libraries for Kotlin and Swift at the same time by leaning hard into type theory. We'll discuss how to then generalise a type-safe API into something unsafe for Java consumers, and how to leverage tooling to protect your library consumers from hard-to-spot breaking changes.



  1. Kotlin Language Announcement -
  2. Software Design Tree and Program Families - Chris (from Sweden)
  3. Make Invalid States Unrepresentable - Andrew Watson
  4. Public API Challenges in Kotlin - Jake Wharton
  5. OkHttp Interceptors - Square Inc.
  6. Metalava - Google
  7. Metalava Gradle Plugin - Tyler Wong
Jamie Sanson

Jamie Sanson