https://kotlinlang.org logo
#dagger
Title
# dagger
b

bodo

12/02/2020, 12:50 PM
Hi Dagger Experts. I have a common question about the annotation processor of dagger. my project is a multi module with a lot of features. and every feature has an activity (annotated with @AndroidEntryPoint). do i have to run annotation processing in every feature module
Copy code
kapt(...)
another example is when i annotate a constructor of a class with @Inject in a library oder feature module, do i also have to run the annotation processor in each of this modules i am asking because then i have to run annotation processing in nearly every module which is not really performant
a

Ahmed Ibrahim

12/03/2020, 2:52 PM
Yes, you have to do that, otherwise your @Inject ctor factories won't be generated.
b

bodo

12/03/2020, 7:25 PM
thx for the answer. are there any best practices for doing the same stuff with other injected classes? e.g. do all with interfaces and provide (@Provide / @Bind) the implementation in the app module. so annotation processing has only to run in the app module and not in library modules