For future reference adding the spring jars in the runtime classpath was enough to solve the issue. The getDeclaredAnnotations found the annotations successfully. Thanks Eric for taking the time to help with this.
Can't keep annotations
Option to let the mapping rules take precedence over mapping file to decide on the obfuscation
Hello, I'm having a VerifyError issue at runtime like this: Exception in thread "main" java.lang.VerifyError: Bad access to protected data in getfield I've created a demo project to reproduce the issue here: https://github.com/benji/proguard-allowaccessmodification Just run: $ gradle clean jar obfuscate run I noticed that the subclass changed the method to public but the superclass still has it protected. I feel like this might be the issue. Thanks, Benjamin
Considering this: -keepclasseswithmembers public class * { public static void main(java.lang.String[]); } I'd like to be able to still force the obfuscation of some classes if they have a specific annotation: @ObfuscateMe public class MyClass { ... public static void main(String[] args) { ... } } How can I tell Proguard to keep all the classes with a main, but obfuscate those that have this annotation? That is, is there a way to select classes that do NOT have an annotation? Reading https://www.guardsquare.com/en/proguard/manual/usage#classspecification...
Hello, The option -keep allows to exclude some classes/methods from obfuscation. -keep class com.example.web.* { ; } But it still obfuscate the methods parameter names, which can be bad for frameworks like Spring web. As far as I understand, the option -keepparameternames is global. Is there a way to preserve the arguments names for certain packages only? Thanks, Benjamin