Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop proguard from obfuscating entire package?

I need to prevent Proguard from obfuscating any classes from the package com.foo.*.

I have tried:

-keep com.foo.** {
    <fields>;
    <methods>;
    <constructors>;
}

But proguard says :

Error: Unexpected keyword 'com.sun.foo.**' in line 32 of file 'obfuscationConfig.pro', included from argument number 1

I get a similar error if I try keep name com.foo** or keep * com.foo.**.

like image 932
David Avatar asked Sep 29 '11 06:09

David


1 Answers

Try to use the following:

-keep class com.foo.** {
  public protected private *;
}
like image 52
Idolon Avatar answered Oct 15 '22 11:10

Idolon