In Android Gradle Plugin version 4.1.0 they changed so assertions now always throw in debug builds. How to disable this feature?
Assertions in debug builds
When you build the debug version of your app using Android Gradle plugin 4.1.0 and higher, the built-in compiler (D8) will rewrite your app's code to enable assertions at compile time, so you always have assertion checks active.