Proguard cannot keep method variable names in interfaces no matter what kind of -keep
options I give it. I tried:
-keep interface com.xxx.data.mapper.* {*;}
and -keepparameternames
I also tried to add -parameters
option to the compiler. But none of them worked.
I need to keep variable names in order for Mybatis to bind the methods to the SQL queries defined in XML files. Otherwise Mybatis throws BindingException
after obfuscation.
Could anyone explain why Proguard cannot do it even if I skip interface obfuscation? If javac doesn’t keep the variable names, how could Mybatis work without obfuscation?