It is possible to get a .aar with a Product flavor
<p>I work on a big project at work, i have been herited 3 months ago. At the moment the project structure is like this :</p>

<ul>
<li>Engine : its a library with my entire code (all java classes) with some extern libraries</li>
<li>App : its a android project but it is just a wrapper for have 2 declinaisons-flavor of the app (different name and icon for commercial purpose). The engine lib is integrated to this app.</li>
</ul>

<p>Additionnaly, sometimes I do build the engine to .aar for one client who use the library without the app wrapper.</p>

<p>My big problem : the last developepr of this project dont good know gradle and android structure, it is some strange res added twice in Engine and App/ build script / extern lib added twice... </p>

<p>So, before i work on a new major version, i want to refator the build system and simplify it ! In the best world, i want to delete the lib project, add the Engine code to the App, for have just 1 project app and use power of flavors for managing specifics parts. </p>

<p>If i have flavors like this :</p>

<ul>
<li>one</li>
<li>two</li>
<li>lib</li>
</ul>

<p>It is possible to use flavor "lib" to get a .aar ?</p>

<p>If you have another solution for simplify or resolve my problem, im over. Thanks in advance :)</p>