vendredi 9 janvier 2015

Pro Guard Ruining my reflection and adding the exceptions in config not working

So basically need to use proguard for my app. But I'm using Reflection to prevent using a giant ass if else statement. So I'm doing this based on State. I have various State based methods. Named



ExtractBy<ST>State()


So in my class I have various methods based on various states a little example is this



ExtractByDCState();
ExtractByALState();
ExtractByAZState();


this works then not running in proguard. but when I use proguard my method names change and ruin my project. Would not be so bad if it weren't for the exceptions not working. My alternative is using a giant if else or case structure but I want to prevent that if possible. here are the exceptions I've put into my proguard rules file.



-keep public class com.app.parsers.StateParsers{
<methods>;
}


I've tried adding the individual methods by name, doesn't work, I've tried doing it to all private methods and it doesn't work, I've tried different keywords and it doesn't work. At this point I just need to know what I'm doing wrong with my exception that prevents this from being done. I've used keepclasseswithnames and a number of other things.






Aucun commentaire:

Enregistrer un commentaire