How to disable DebugMetadata annotation about kotlin.coroutines?


#1

There is a kotlin.coroutines.jvm.internal.DebugMetadata annotation on each class that contains coroutines, the meta data stored on this annotation is useless after class file obfuscated by proguard, and the information of original class file are leaked.


#2

If you do obfuscation (like with Proguard) you can have the tool strip the annotation. Proguard can certainly do it. And it is “valid” as the code is not designed for development anyway.


#3

This annotation is inlined and invoked at kotlin.coroutines.jvm.internal.SuspendLambda#toString, and there is no way to remove toString() method of subclass with Proguard.