-
Notifications
You must be signed in to change notification settings - Fork 2.4k
AA: 3.1 - Otto support #1131
Comments
If I just update AA from 3.0.1 to 3.1 my Otto implementation breaks |
Hello
|
Can you guys provide a simple projekt which uses AA and Otto? |
Hello, It will be a little bit complex to do a sample project, but I can extract some logics : public abstract class AbstractScreen extends Fragment { @subscribe
} Then I have a class that derived from class AbstractScreen @efragment(R.layout.navigation_action_pos) } In 3.0.1, I got the following method generated
But in 3.1, nothing is generated . Hope that helps. Best regards, Le 9 sept. 2014 à 12:31, Csaba Kozák notifications@github.com a écrit :
|
Are you using the annotation procesing version of otto as described in the wiki? |
Maybe I have missing out on something , because I have read the following wiki : There is no mention of annotation processing version of otto :-( Le 9 sept. 2014 à 12:48, Csaba Kozák notifications@github.com a écrit :
|
We copy non-AA annotations from the class to the generated class. |
You should use otto 2.0 wip version which walks parent classes too find annotations. |
aah.. so I was missing something.. I do apologize.. Carry on.. :) |
@yDelouis should we copy from parent classes? I do not think so, since the lib which uses the annotation should check parent classes anyway. AAs is only breaks this if the lib wants to get annotations from the leaf class, but we fixed that by copying. |
If don't think so either. |
Nobody seems to work on this branch :( Le 9 sept. 2014 à 13:01, Csaba Kozák notifications@github.com a écrit :
|
That branch is dead. I think you guys should try greenrobot eventbus. |
It’s weird, because in 3.0.1 the annotations is copied from parent to generated class. I switched back to 3.0.1 and tested it again, the method with annotation is copied. In 3.1, I also overrided the method on the child and annotate it with @subscribe, but still the method is not generated. The log below : :13:21.197 [main] INFO o.a.AndroidAnnotationProcessor:84 - Initialize AndroidAnnotations 3.1 with options {trace=true, logLevel=info, logConsoleAppender=true} Le 9 sept. 2014 à 12:57, Yoann Delouis notifications@github.com a écrit :
|
Thanks for the tips ! https://github.com/greenrobot/EventBus seems to be great :-) I will give a try soon. Until the migration, I will be stick with AA 3.0.1. Le 9 sept. 2014 à 13:25, Csaba Kozák notifications@github.com a écrit :
|
There is no need to generate the methods, since otto 2.0 wip can walk parent classes and it will find your methods annotated with @subscribe. |
I tend to close this ticket, since the problem is in the stable version of Otto (not walking to parent classes), and not in AA. I am also wondering we should remove the Otto integration page from the wiki. Since the stable version of Otto can be used with AA as without AA (we copy non-AA annotations), there is no need to describe integration. Also that page points the user to an abandoned version of Otto, which is unfortunate. @PerfectCarl what do you think?. |
I am closing this ticket in favor of the referenced one, because that is more focused on the issue. |
Congratulations on the release of AA 3.1. Awesome work by everyone.
So, did you decide to remove support for Otto, or what happened in the process? Maybe I am missing something?
Regards,
David
The text was updated successfully, but these errors were encountered: