title: How to exclude duplicate native library from Gradle project dependency?
body: <p>I have two Gradle modules for Android, one is a library and one is an application, and the application has a dependency on the module, like so: <code>compile project(path ':library' configuration: 'debug')</code></p>
  
  <p>The problem is that both modules use JNI, so they both package<code>libc++_shared.so</code> 
   from the NDK, causing:</p>
  
  <pre><code>com.android.build.api.transform.TransformException:
  com.android.builder.packaging.DuplicateFileException:
  Duplicate files copied in APK lib/armeabi-v7a/libc++_shared.so
  </code></pre>
  
  <p>I tried using <code>packagingOptions</code>, but it seems like I can only use that to completely exclude that file from being packaged at all, not just from being copied from the other module?</p>