-
Notifications
You must be signed in to change notification settings - Fork 44
Barber is incompatible with Dagger code generation #6
Comments
Can you give me a little more info? Everything still builds just fine for me if I add dagger to my dependencies. A stacktrace would be useful. |
If more than one annotation processor is used then this also has to be added to the build config: android {
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
} You should get a warning about this though, so perhaps the issue is elsewhere. |
Ah yes, that's a good point. Would be better if @inktomi could provide some more clarification though |
I'm so sorry. I've been out of town. I will try this tomorrow on a fresh project to ensure there was nothing else happening in mine.. |
Sounds good, thanks! |
@inktomi any luck? |
Hi, sorry for the delay. I set up the following little test project. It shows the issue when you try to run it. https://github.com/inktomi/BarberDagger
|
I see. Have you tried @denley's solution? I'm not very familiar with Dagger, so I'm not sure where to start with this since all the code looks like it's just dagger issues.
|
I do have that included in the gradle file for the app module.. no affect though =\ https://github.com/inktomi/BarberDagger/blob/master/app/build.gradle |
Hmm, I have no idea then. I'll try looking at it some this weekend, but no promises. Going to mark this as help wanted now as well |
I just had a quick look and I think I've figured it out. It's actually not an issue with Barber (the same problem occurs when you remove the Barber dependencies). It appears to be an issue with the android-apt plugin ignoring the It will work with the following configuration instead (notice the apt 'io.sweers.barber:barber-compiler:1.0.1'
compile 'io.sweers.barber:barber-api:1.0.1'
compile 'com.squareup.dagger:dagger:1.2.2'
apt 'com.squareup.dagger:dagger-compiler:1.2.2' |
Ah interesting, so someone can't use |
It appears that way. The apt plugin seems to completely take over the annotation processing or something like that. |
Interesting. Well, good to know. @inktomi can I mark this as resolved then? |
Awesome. Thanks for the team effort!! |
Hi -
Tracking this, so I wanted to put in an issue. When adding Barber to a project that already uses Dagger (and dagger-compiler) for injection, dagger code generation fails to run.
My setup is as such;
The text was updated successfully, but these errors were encountered: