Fail your build on Kotlin warnings

Maxi Rosson
Jun 25 · 3 min read

How to fail your Gradle build on certain Kotlin warnings

Kotlin warnings are very useful for developers. They help to clean up the code and even fix potential bugs.

This is how they look on the Gradle output:

w: /Users/dipien/android-sample/app/src/main/java/com/dipien/sample/MainActivity.kt: (16, 7): Variable ‘unused’ is never used