KJW
KJW

Reputation: 15251

Proguard: how to filter certain packages from being obfuscated?

Is there a way to filter certain packages from obfuscation? Currently obfusticating a certain class results in failure to find a native library in the local directory, so I just want the main application logic to be obfuscated.

Upvotes: 0

Views: 802

Answers (2)

jfk
jfk

Reputation: 5307

Here is the solution

-keep class com.example.abc.** { *; }

Upvotes: 0

Stephen C
Stephen C

Reputation: 719616

You can use Proguard's "Keep" options to limit what gets obfuscated. Refer to the Proguard Manual's Usage page for all of the details. There are many examples in another part of the manual.

If you have difficulty figuring it out, there are other SO Questions on how to use Proguard's "keep" options. Feel free to read through the "Related" questions listed in the right-hand of this page.

Upvotes: 1

Related Questions