# Dagger_2_Component_Problem
This is a poorly created two project repository to show a problem I have with googles dagger 2.

## How to run
I use gradle 2.3.10 and java 8 in cygwin under windows 8.

Clone this repository and execute a 'gradle clean compileJava' inside the 'DaggerUsingProject'.
Afterwards check 'build/generated/source/apt/main/di' for a generate Dagger component

## Where is the problem?
When a second AnnotationProcessor builds sources, those are not completely detected/processed by dagger. Dagger will create some files for them, but not all.

In the state the project is checked in, after compile there is no Dagger component generated from 'di.ProjectComponent'. But there was no error during compilation although dagger picked up the file generated by the custom AnnotationProcessor, because there are MembersInjector and Factory classes generated for it.

When the 'di.RandomInterfaceModule' method 'RandomInterface provideRandomInterface' uses 'CopiedFromOtherProcessor' instead of 'GeneratedByOtherProcessor' as argument (which is a copy from the generated file, except the classname) then the project still compiles without error AND it will generate the Dagger component file correctly.



# Dagger_2_Component_Problem
This is a poorly created two project repository to show a problem I have with googles dagger 2.

## How to run
I use gradle 2.3.10 and java 8 in cygwin under windows 8.

Clone this repository and execute a 'gradle clean compileJava' inside the 'DaggerUsingProject'.
Afterwards check 'build/generated/source/apt/main/di' for a generate Dagger component

## Where is the problem?
When a second AnnotationProcessor builds sources, those are not completely detected/processed by dagger. Dagger will create some files for them, but not all.

In the state the project is checked in, after compile there is no Dagger component generated from 'di.ProjectComponent'. But there was no error during compilation although dagger picked up the file generated by the custom AnnotationProcessor, because there are MembersInjector and Factory classes generated for it.

When the 'di.RandomInterfaceModule' method 'RandomInterface provideRandomInterface' uses 'CopiedFromOtherProcessor' instead of 'GeneratedByOtherProcessor' as argument (which is a copy from the generated file, except the classname) then the project still compiles without error AND it will generate the Dagger component file correctly.

Dagger 2 issue created about this: https://github.com/google/dagger/issues/269

Update readme with the dagger 2 issue link
Update readme with the dagger 2 issue link