Chandela
Chandela

Reputation: 312

How to obfuscate classes present in a package by proguard Android?

I want to obfuscate some class files after ProGuard implemented.

Like I want to hide or obfuscation some classes name and members in a particular package. So that these will not be understandable after decompiling the application.

Example: I want to obfuscate classes present in package com.myapp.serverCall

How can I do this? Please help me to achieve this. Thanks in advance.

Upvotes: 2

Views: 235

Answers (1)

Bruno
Bruno

Reputation: 4007

You can preserve all classes except the ones in some packages with an option like

-keep class !com.myapp.serverCall.** { *; }

The exclamation mark means "not these classes", thus only matching all remaining classes. The asterisk between parentheses means "all fields and methods".

Upvotes: 1

Related Questions