2

This is the bare minimum specified by Roboguice for proguard support: https://gist.github.com/matthawley/1327908

I am forced to add these to prevent the code from crashing:

-keep class com.appmanager.ui.fragments.* { *; }
-keep class com.appmanager.ui.views.* { *; }

Which means that all of my views and fragments are not obfuscated. Is there a way to circumvent this behaviour?

Eugen Martynov
  • 19,888
  • 10
  • 61
  • 114
JY2k
  • 2,879
  • 1
  • 31
  • 60

1 Answers1

0

I'm not big expert of progurad. But according to documentation you can ask proguard keep only annotated fields.

I've just checked the official RoboGuice wiki for proguard and it is saying that it only requires field names, activity names, services names, some specific method names, etc.

I'm not sure how big is you project and how wide RoboGuice is used. You can try another dependency injection like Dagger which uses much less reflection (version 2.0 is free from reflection at all)

Eugen Martynov
  • 19,888
  • 10
  • 61
  • 114