 <p>I finally found the answer to my issue : it is NOT possible, but it might be possible to do it one day : see documentation about that : <a href="http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Library-Publication" rel="nofollow">http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Library-Publication</a></p> <p>I went through this problem with this solution :</p> <pre><code>// default publication is production which will be published without env name publishNonDefault true defaultPublishConfig "productionRelease" if (android.productFlavors.size() &gt; 0) { android.libraryVariants.all { variant -&gt; // Publish a main artifact, otherwise the maven pom is not generated if (android.publishNonDefault &amp;&amp; variant.name == android.defaultPublishConfig) { def bundleTask = tasks["bundle${name.capitalize()}"] artifacts { archives(bundleTask.archivePath) { classifier null builtBy bundleTask } } } } } </code></pre> <p>I am not satisfied with it but it will do the job for now ...</p>