title: Use different library module for each android flavor
body: <p>I want to use a different library module for each flavor. </p>
  
  <p>For example: </p>
  
  <ul>
  <li>free flavor -> I need to use the free library module</li>
  <li>paid flavor -> I need to use the paid library module</li>
  </ul>
  
  <p>My flavors </p>
  
  <pre><code>productFlavors {
      free{
       ....... 
       }
      paid{
       ....... 
       }
     }
  </code></pre>
  
  <p>What I tried </p>
  
  <pre><code>freeImplementation  project(path:':freeLib', configuration: 'free')//for free
  
  paidImplementation  project(path:':paidLib', configuration: 'paid')//for paid
  </code></pre>
  
  <p><strong>But I got compile error not able to use this</strong></p>
  
  <p>Note: It's not a duplicate question. I already tried some StackOverflow questions. It's outdated (they are using compile)</p>
  
  <p>Reference - <a href="https://stackoverflow.com/questions/24860659/multi-flavor-app-based-on-multi-flavor-library-in-android-gradle">Multi flavor app based on multi flavor library in Android Gradle</a> </p>
  
  <p><strong>Solution</strong> (from Gabriele Mariotti comments) </p>
  
  <pre><code> freeImplementation project(path:':freeLib')
   paidImplementation project(path:':paidLib')
  </code></pre>