Do not retain runtime invisible annotations in sdk proguard rules

The pattern *Annotation* also matches the attributes RuntimeInvisibleAnnotations, RuntimeInvisibleParameterAnnotations and RuntimeInvisibleTypeAnnotations, which are used to retain runtime invisible annotations (i.e., class retention annotations).

This change ensures that only runtime visible annotations are retained in R8 builds. In comparison, D8 strips all runtime invisible annotations  by default and does not have any mechanisms for keeping runtime invisible annotations.

See also https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/RetentionPolicy.html#CLASS.

Bug: 387958004
Test: existing
Change-Id: Id63d77a88d219313523b0b4ac99ff3044cf56233
2 files changed