I am currently creating a library for private use which provides an Annotation (lets call it @Something
) which can be used on Properties of a data class. I created the annotation like so:
@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.PROPERTY)
annotation class Something
It will be used like this
data class SomeDataClass (val param1: String, @Something val param2: String, val param3: String)
I then want to be able to access the following things on the class that contains properties with this annotation:
- memberFunctions (to get the copy constructor)
- parameters of the copy constructor
- memberProperties
- property annotations
- property name
- List item
Now everything works properly until I minify my library with ProGuard. As I understand it, I need to describe my ProGuard rules in consumer-rules.pro
. But what exactly do I need to add here? I want every data class in the application that uses my library that has a property annotated with @Something
to be kept so I can read the things above from it.