My situation is the following
I have class with a public companion object as it follows:
open class ParentClass {
...
companion object {
...
const val CONST_PROPERTY = "value"
}
}
And other class ChildClassFromParentClass which inherits from ParentClass.
I use this property like this:
import package.ChildClassFromParentClass
class OtherClass {
...
private fun doStuff() {
val variable = ChildClassFromParentClass.CONST_PROPERTY
}
...
}
It is possible to configure proguard-rules.pro to expose ChildClassFromParentClass.CONST_PROPERTY but obfuscate ParentClass.CONST_PROPERTY?
I've tried this, but it's not working
-keepclassmembers class package.ChildClassFromParentClass$** {
public static ** Companion;
}