-
Notifications
You must be signed in to change notification settings - Fork 72
Description
It should already be possible to test compiler plugins by adding their path to the pluginClasspath. However, this is kinda annoying as you have to find that path first (which may or may not necessitate writing a Jar with the service registrations manually) and the ComponentRegistrars will be instantiated by the compiler's service locator, so we can't pass any arguments to it or use anonymous classes in tests. Since we are already doing all this with the custom KaptComponentRegistrar, I figure we could just execute a list of given ComponentRegistrars there. Care has to be taken to ensure that only the right ComponentRegistrars are executed during the right compilation stages (maybe use separate ComponentRegistrars or a thread-local flag if nothing else works).
Any thoughts on this?