I want to skip a particular class from deletion. It isn't normally referenced anywhere in my application, but only by reflection, therefore it does get removed by the shrinker. It is referenced by other "adjacent" classes in its package, but yet, not used for my application directly, but only by reflection.
I decided to treat specifically for this particular class, a mapping:
org.mypckg.Helper -> gh6
...then ofcourse I changed the reflection call withing my app:
forName("gh6")
There seems to be no problem with my mapping input, but the mapping rule itself is not enough to prevent the class from removal. In addition I still cannot keep the class using the -keep switches, because it does preserve it using its original name (org.mypckg.Helper), which I don't want.
For one reason or another, I cannot manually refractor(rename) the class to 'gh6' within the project.