-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify meaning of "present" for -if
option
#344
Comments
Hi @Marcono1234 , These kind of rules are normally used where some library/tool generates classes based on the name of other classes e.g. some
See this example on the ProGuard Playground: https://playground.proguard.com/p/YLS4pH
|
Thanks for the answer! Is there a reason then why the documentation has "present" formatted as "
Maybe that is some (undocumented) special behavior for R8 then, see also google/gson#2397 (comment). |
It's a good question. To be precise,
Such a construct may be suboptimal, if the kept classes aren't really necessary (as always). |
Thanks for the clarification!
If I understand it correctly then, for ProGuard an
It appears to me that even though it is suboptimal, for R8 it is at least better than just using Would it be possible to adjust the ProGuard documentation to replace or adjust the confusingly formatted " |
My musings about the technical details may have added to the confusion -- the bottom line is that ProGuard may still remove both the The automatically converted highlight The initial rule for GSON in the R8 tracker seems correct to me. The correction suggested later probably works, but the |
The documentation for the
-if
option currently says:Could you please clarify what "present" here means? I assume it means "present after the shrinking phase" (in that case please adjust the documentation). Because for example in the context of R8 (and I assume the same applies to ProGuard) I saw usages like
-if class *
, and without this "after shrinking", that option-if class *
would seem like a no-op / be always true.As side note: The Dagger and Butterknife examples referenced from the
-if
documentation and various other places don't seem to exist anymore.The text was updated successfully, but these errors were encountered: