How to obfuscate only a few classes or one package?

I would not confuse my entire project, but only the main class. How to write a proguard file to exclude the entire project and obfuscate only one class or one package?

+8
android proguard
source share
1 answer

Read the answer to the bottom level. You need! in front of your class.

Take a look at the Proguard Guide : 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 confuse the specified package names. An optional filter is a comma-separated list of package names. Package names may contain ?, * and ** wildcards, and they may be preceded by! Negator Applies only to entanglement.

0
source share

All Articles