I would not obfuscate all my project but just the mostly key class. how to write the proguard file to exclude all project and obfuscate only a single class or a single package ?
Asked
Active
Viewed 3,434 times
1 Answers
0
Please read the answer before downvote. You need ! before your class.
Take a look at Proguard Manual: Keep option
part and Android example .
Example :
-keeppackagenames com.vtcmobile {
! com.yourpackage.CategoryParser // keep package com.vtcmobile excluded class com.vtcmobile.CategoryParser
}
Edit: Use
-keeppackagenames [package_filter] Specifies not to obfuscate the given package names. The optional filter is a comma-separated list of package names. Package names can contain ?, *, and ** wildcards, and they can be preceded by the ! negator. Only applicable when obfuscating.

Trung Nguyen
- 7,442
- 2
- 45
- 87
-
4this will only keep class that extend Activity and exclude one single class, my goal is to exclude ALL the project and obfuscate only one class. – Giuseppe Aug 10 '12 at 07:02
-