I have an app that uses ActiveAndroid, a database ORM library, that relies on annotations.
@Table(name=\"test\")
public class DatabaseItem extends ActiveReco
For those only using Gradle, the solution is very similar (note the single quotes around the Annotation):
keep 'public class java.package.** { *; }'
keepattributes '*Annotation*'
This is especially useful if you are using JSON serialization annotations (e.g., Jackson or the like) in a vanilla Gradle project.