tags:

views:

561

answers:

1

I'm obfuscating a library with ProGuard using the Ant task.

I'm keeping particular class names and their method names when they have a particular annotation (@ApiAll) and I'm requesting that the InnerClasses attribute be kept:

  <keepattribute name="InnerClasses" />
  <keep annotation="com.example.ApiAll"/>
  <keepclassmembers annotation="com.example.ApiAll">
     <constructor access="public protected"/>
     <field access="public  protected"/>
     <method access="public  protected"/>
     <constructor access="protected"/>
    </keepclassmembers>

If I check the mapping output file I can see that my inner class that has the annotation and it's members are keeping their names unobfuscated. However when I look in the generated jar file I can't find the class.

Am I missing something? Why is the mapping telling me it's keeping this class when it's not?

A: 

Add verbose="true" to the task, it may give you some clues.

David Rabinowitz