I'm using a java annotation processor to generates additional classes at compile time. It works fine when building with gradle, but I can't get IntelliJ to recognize the generated classes. Whenever I try to build the project in IntelliJ, it errors saying that it can't find the symbols that refer to the generated class. In the same vein, since it doesn't know about the classes, it's not giving me any help in writing code that uses the classes, and just highlights it all as an error.
I have two sibling modules: the "processor" module implements the annotation processor and defines the annotations. The "demo" module is just some JUnit tests to try out the annotation processor. I can build the "processor" module in IntelliJ fine, but the "demo" one gives me the errors as described above. I've got "processor" as a dependency of the "demo" module, at the "Test" scope (I've also tried "Compile" scope).
How can I get IntelliJ to recognize the classes automatically?
Update
I've been able to get it to build by creating a new profile under "Annotation Processors" in the settings dialog, moving the "demo" module under that profile, enabling annotation processing for that profile, and specifying the FQCN of the annotation processor under the "Annotation Processors" list box.
However, the live code help still isn't working, the editor just tells me it can't find the class, which is really more important (because I could always build from gradle).