0

Using -keep does not keep methods and fields. They are obfuscated but I do not want to obfuscate some classes with methods and fields.

Rules used

-target '11'
-keep public class com.example.MyClass 

If I use and proguards returns a class which Java Decompiler can not decompile (message 'Internal Error' after decompiling) e.g.

-keep public class com.example.MyClass {
   <methods>;
   <fields>;
}

I tried also [*;}.

Is there something wrong/bug with ProGuard Version 7.3.0 and using option target '11'?

beub
  • 43
  • 11
  • Based on [another question](https://stackoverflow.com/questions/10971810/proguard-keep-class-names), are you looking for `-keepnames class com.example.MyClass`? ("keepnames" instead of "keep" and no "public") – byxor Dec 20 '22 at 18:09
  • no, that does not work – beub Dec 21 '22 at 12:54

1 Answers1

0
-keep interface com.example.ApiContext { *; }
-keep abstract class com.example.ControlContext { *; }
-keep class com.example.CloseInstanceContext { *; }

I think 'abstract' was the problem, that it did not work.

beub
  • 43
  • 11