Hi
I'm using a Java library (dagger,
http://google.github.io/dagger/) that uses annotation processing to generate some classes for its dependency injection mechanism.
If I define a component like this in Xtend:
@Component(modules=#[...]) interface MyComponent { ... }
The dagger annotation processor will generate a Java class called "DaggerMyComponent". Since I would like to use this generated class in Xtend, I have a chicken/egg problem during the build: Xtend is transformed before the the Java compiler runs its annotation processors, hence Xtend is unable to resolve the DaggerMyComponent class.
My current workaround is to create a Java class that encapsulates all the calls to these generated classes, but I would like to eliminate this if possible.
I also thought about creating an active annotation that just creates a more or less empty class so Xtend can resolve what it needs, but I would have to delete this generated class before the Java compiler runs, or somehow tell the compilers to output their generated classes to the same folder, so the class generated from the Java annotation processor overwrites the one from Xtend. But I'm not sure if that works, maybe for the Maven build, but Eclipse would probably not like it at all.
Would love to hear if someone has solved this another way or has a good idea.
Thank you in advance!
-Chris