title: Gradle include all in a flavors libs folder (Compile fileTree whole libs folder)Edit: set sourcedir per flavor for so files
body: <p>So I want to include all files and sub-directories in a flavors file-structure. What I am doing here is including all jar and so files in the libs folder but I also want to include directories.</p>
  
  <p>I tried include <code>include ['*']</code> but that didn't work. I also looked around for an answer for a while but came up short. What is the correct way of accomplishing this?</p>
  
  <pre><code>dependencies {
      //format for including lib files for all flavors
      compile fileTree(dir: 'libs', include: ['*.jar'])
      //format for including all jars and so's in pdf flavor
      //pdfCompile fileTree(dir: 'libs', include: ['*.jar'])
      pdfCompile fileTree(dir: 'src/pdf/libs', include: ['*.jar','*.so'])
  }
  </code></pre>
  
  <p>When running app the following exception tells me that not all .so files are included.</p>
  
  <pre><code>java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.company.appname-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libPDFNetC-v7a.so"
  </code></pre>
  
  <p>Edit: Below is my file-structure. FYI: src is a child of my module, and is a sibling of libs.
  <img src="https://i.stack.imgur.com/8gXGV.png" alt="enter image description here"></p>