Keep Rules In the Age of Kotlin -- by James Hamilton

With Kotlin’s rise to prominence as the preferred programming language for Android development, as well as its growing popularity for desktop and server development, we have adapted our tools to evolve with it. Welcome to the Age of Kotlin!

In this article, Keep Rules in the Age of Kotlin, our lead ProGuard Engineer, James Hamilton, provides advice on how to overcome challenges associated with writing keep rules for Kotlin. In addition he explains, through examples, how the ProGuard Playground helps in this process.

Examples include:

  • The Kotlin main function
  • Kotlin types
  • Companion objects
  • Extension functions and properties
  • JVM Annotations

By the end, you’ll see why you need to think in terms of Java when writing keep rules for Kotlin.

Let us know what you think. Also, don’t forget to try the challenges we have embedded!