title: How do I add an unknown amount of unknown modules in Dagger 2?
body: <p>I have several modules that I don't know at compile time (think "plugins"). They all implement a "tag" interface <code>MyModule</code>: <code>public interface MyModule {}</code></p>
  
  <p>I've instantiated them thanks to <code>ServiceLoader</code> and <code>@AutoService</code>.</p>
  
  <p>How do I add them all to my component builder?</p>
  
  <p>The Dagger 2 authors <a href="https://github.com/google/dagger/issues/474" rel="nofollow">seem to think</a> that this question is relevant to StackOverflow. I don't believe that it is, because it looks like a missing use case, but well, I give them the benefits of the doubt here and post it.</p>
  
  <p>I know I could use Guice or Dagger 1, but as said in the ticket to the Dagger 2 team; I don't want any reflection (bar <code>ServiceLoader</code>), and Dagger 1 is now deprecated. Also, recommends switching to Dagger 2 (which is why I'm trying to upgrade my Dagger 1 project to Dagger 2).</p>