Repository navigation
Make guieffect qualifiers CLASS retention (not RUNTIME). - #2118
lazaroclapp wants to merge 1 commit into
Conversation
|
Looks good to me. |
|
@lazaroclapp There is a FAQ about why type annotations are declared with |
|
@mernst I see your point there. The original issue wasn't about APK sizes, although that's important too, but about certain annotations not being compatible with the version of Java that Android tooling can deal with, see below. @kageiit @msridhar I remember that the issue here was that type use annotations in particular (e.g. |
|
The biggest concern with runtime annotations is that types annotated with such annotations are always kept in the main dex by the default android gradle plugin which is used by 99% of android users in the world. This means that using these annotations can effectively lead to main dex overflows and any users of this library effectively unable to build their android apps.
|
|
Thanks for the explanation. That makes sense, and I was not aware of that behavior of the default android gradle plugin. I agree we should create a |
This is one of the small internal patches mentioned in #2113 and is not needed for us to open source the RxThreadEffectChecker, so it is not high priority to us. The idea is to avoid these annotations being preserved into the APKs of analyzed Android apps, since we never check them after building. It probably doesn't make much of a difference for plain Java apps, but at least in the way our build system works,
CLASSannotations and not retained after dexing. Chances are other type annotations could be switched as well, but these are the only ones we use.