I have a multi-module Android project which contains multiple applications. Each one of those application modules includes a set of interfaces that an annotation processor will use to generate code based on the class-path of this module (specifically, Dagger). Today, those interfaces are duplicated, and I can’t move them to a shared module due to the code generation requirement (class-path).
I tried to create a shared folder and include it as a source directory to all those application modules (I know this sounds ridiculous, but I did not find another way…) but, for some reason, only one of the application modules randomly recognized the folder as part of it (sourceroot) and the others fails (both at IDE and compilation level).
Is there a way to include a piece of code in multiple modules to be compiled and processed inside the included module?
I appreciate any help you can provide.