Currently, if one wants to write their own module that in turn code gens more concrete modules/implementations they can't because Dagger only looks for @ContributesAndroidInjector. It would be great if this was opened up as a more generalized solution to allow anyone to write their own module contributor for alternative frameworks and make @ContributesAndroidInjector just a first party user of that API.
One proposal I've seen in discussion from is something along the lines of adding an annotation to signify that your module is doing contributions. Loosely paraphrased - Annotate it with @AutoModule and make Dagger auto read any @Module with @AutoModule on it
Some places where this becomes useful are in alternative android frameworks, like Conductor or various MVP patterns. The blueprinting appeal is pretty strong and I think widely applicable.
Dupe of #804?
I told @hzsweers to open this one up to keep the ideas separate - even if we did this, that issue could still be relevant on its own
If any of you guys is interested i created a small library which makes it possible to @ContributesAndroidInjector for every type such as views or conductor controllers.
You can check it out here: https://github.com/IVIanuu/Contributer/
I see there's been movement on this, but just to throw more fuel on the fire: This would be helpful for Kapt in Kotlin projects, which currently doesn't support multiple rounds well. This makes something like assistedinject more tedious to use, as assistedmodules have to (in my experience) be isolated to not include other non-generated modules to work smoothly.
Most helpful comment
I see there's been movement on this, but just to throw more fuel on the fire: This would be helpful for Kapt in Kotlin projects, which currently doesn't support multiple rounds well. This makes something like assistedinject more tedious to use, as assistedmodules have to (in my experience) be isolated to not include other non-generated modules to work smoothly.