The rmtypedefs tool is inteded only for the Android build itself. It is given a set of .class file folders, and it finds any .class files within those folders that correspond to "typedef annotations": these are annotation classes that themselves have been annotated with @IntDef or @StringDef. These typedefs should all be using @Retention(RetentionPolicy.SOURCE), something this tool will check and report if not the case. However, even if an annotation only has source level retention, the annotation class *itself*, will still be created as a .class file. We don't want these annotations in the Android system image, so this tool is used to find and nuke the corresponding .class files for the annotations themselves. Change-Id: Ia343cc5bdbf215ded24b4354f3d92f5a9076eae3
Android TypeDef Remover 1.0 This utility finds and removes all .class files that have been annotated with the @IntDef annotation (android.annotations.IntDef) or the @StringDef annotation (android.annotations.StringDef). It also makes sure that these annotations have source level retention (@Retention(RetentionPolicy.SOURCE)), since otherwise uses of the typedef will appear in .class files as well. This is intended to be used during the build to strip out any typedef annotation classes, since these are not needed (or desirable) in the system image.