Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to tell Proguard to avoid obfuscating JNA library classes?

Tags:

java

proguard

jna

In other words: what -keep commands should I use to tell Proguard to avoid obfuscating my classes that represent native libraries? (since JNA requires that the names match the equivalent native function, struct, etc.)

like image 580
Kevin K Avatar asked May 11 '12 19:05

Kevin K


1 Answers

This is the rule I'm using for now:

-keepclassmembers class * extends com.sun.jna.** {
    <fields>;
    <methods>;
}

I still think there might be a better way to do it though.

like image 80
Kevin K Avatar answered Nov 12 '22 23:11

Kevin K