Hello! I’ve recently discovered that -keepnames class * implements java.io.Serializable
is preventing obfuscation of the class names for classes with nested kotlin.jvm.internal.Lambda
implementations. It can be demonstrated in a following example:
class DataProvider {
private val _data by lazy {
"data"
}
fun getData() = _data
}
In this case static final class Interactor$_data$2 extends Lambda...
is generated inside DataProvider
and the DataProvider
keeps it’s name. Once I replace by lazy
with plain assignment private val _data = "data"
, DataProvider
name is getting obfuscated.
While I understand that it’s an intended behaviour, I would like to ignore the -keepnames class * implements java.io.Serializable
for kotlin.jvm.internal.Lambda
and its’ implementations. Is that achievable?