Building an Android Instant App with Application Component from Dagger : <p>I'm currently experimenting with InstantApps and would like to include dagger into my project.</p>

<p>I'm facing an issue setting up an application AppComponent. My application component includes all the feature dagger modules of my app.</p>

<p>I basically have:</p>

<ul>
<li><strong>One Base app module</strong> containing my Application class </li>
<li><strong>Multiple features</strong> with each a dagger Module per Activity, all with Base as a dependency.</li>
<li><strong>One app module</strong> and instant module both importing all the features and the base app module.</li>
</ul>

<p>I'm trying to figure out the setup before adding the Instant App module.</p>

<p>From InstantApps documentation and project examples. It seems like the Application class needs to be in Base. From the Dagger documentation, to setup dagger:</p>

<pre><code> DaggerYourAppComponent.create().inject(this);
</code></pre>

<p>Should be included in your application class. However, this seems to be impossible as the AppComponent needs to reference all the feature dagger modules.</p>

<p>My <strong>questions</strong> are:</p>

<ul>
<li>Where should I add my AppComponent dagger module?</li>
<li>Should I keep my application in the app module and not in Base?</li>
<li>Any GitHub repo or documentation around Dagger with Instant Apps?</li>
</ul>

<p>Thank you</p>
