title: Cordova Plugin - Use AAR
body: <p>I'm trying to figure out how to include LibBlinkID.aar file into the Cordova plugin. So far I have tried <a href="https://stackoverflow.com/questions/30130838/cordova-plugin-add-external-aar-file-not-jar">this</a>, <a href="https://stackoverflow.com/questions/46468892/how-to-include-multiple-aar-files-in-custom-cordova-plugin">this</a>, <a href="https://stackoverflow.com/questions/24506648/adding-local-aar-files-to-gradle-build-using-flatdirs-is-not-working">that</a> and other places here, on SO, all to no avail.</p>
  
  <p>First of all, I was trying to figure out the proper build.gradle file that will do a proper build: </p>
  
  <pre><code>    repositories{    
   jcenter()
     flatDir {
       dirs './libs'
     }
  }
  
  dependencies {
    compile (
        name:'LibBlinkID',
        ext:'aar')
  }
  
  android {
   packagingOptions {
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
   }
  }
  </code></pre>
  
  <p>But for some reason during compilation it says that compile() is not being found - that is because it shouldn't be in the top-level build.gradle. Okay, where do I put this file into then?</p>
  
  <p>This is the structure of the project:</p>
  
  <pre><code>MyProject
    src
     android
      com
       mynamespace
        FileThatUsesClassesFromLibBlink.java
      libs
       LibBlinkID.aar
  </code></pre>
  
  <p>And then is the second question - with Gradle version 4.6, how do I make sure LibBlibkID.aar is used?</p>