It is my understanding that annotations declared with @retention(RetentionPolicy.SOURCE) are discarded at compilation time and as such are not needed at runtime.
Most annotations are in this case, with the exceptions being:
com.googlecode.androidannotations.annotations.EBean / @retention(RetentionPolicy.CLASS)
com.googlecode.androidannotations.annotations.rest.Rest / @retention(RetentionPolicy.CLASS)
com.googlecode.androidannotations.annotations.EApplication / @retention(RetentionPolicy.CLASS)
Including them in the androidannotation-api JAR ends up in making the final APK unnecessarily big.
Indeed, a quick analysis of the com/googlecode/androidannotations/androidannotations/2.4/androidannotations-2.4-api.jar file seems to indicate that these annotations are taking up to 60% of its size.
Placing those annotations in a separate JAR that could be depended on with a "provided" scope would lighten the final APK, wouldn't it.
I'm not that familiar with the annotation processor so I wouldn't be surprised if I'm completely wrong...
Best regards,
Patrick.
PS: thanks to pyricau and a-thomas for the great presentation at last evening PAUG!