title: Exclude package/classes from @aar, gradle dependency
body: <p>I've following dependency added in <code>build.gradle</code> file.</p>
  
  <pre><code>compile 'com.aerisweather:aeris-maps-lib:2.0.0@aar'
  </code></pre>
  
  <p>It is from</p>
  
  <p><a href="https://oss.sonatype.org/content/repositories/comaerisweather-1027/com/aerisweather/aeris-maps-lib/2.0.0/" rel="noreferrer">https://oss.sonatype.org/content/repositories/comaerisweather-1027/com/aerisweather/aeris-maps-lib/2.0.0/</a></p>
  
  <p>If you the see artifacts from following URL, It has android support v7 library classes.</p>
  
  <p><a href="https://oss.sonatype.org/#nexus-search;quick~aerisweather" rel="noreferrer">https://oss.sonatype.org/#nexus-search;quick~aerisweather</a></p>
  
  <p>I want to exclude that package when running/packaging the application. I'm unable to run/package the app due to duplicate class error.</p>
  
  <p>I've tried adding configurations like this,</p>
  
  <pre><code>configurations {
      all*.exclude group: 'com.android.support', module: 'appcompat-v7'
  }
  </code></pre>
  
  <p>But this excludes it from entire project which leads me to many errors.</p>
  
  <p>I've tried everything but still getting following error.</p>
  
  <blockquote>
    <p>Error:Execution failed for task ':transformClassesWithJarMergingForDebug'.
    com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v7/appcompat/R$anim.class</p>
  </blockquote>