title: Duplicate class using product flavours
body: <p>My android gradle build has many flavours. 
  One of then has an aar file that contains a duplicate dependency  (com.google.zxing).</p>
  
  <p>build.gradle:</p>
  
  <pre><code>...
  dependencies {
      implementation 'com.google.zxing:core:3.3.3'
      implementation 'me.dm7.barcodescanner:zxing:1.9.8'
      // Standard flavour
      standardImplementation(name: 'libgedi-0.190121.gpos800', ext: 'aar') {
          exclude group: 'com.google.zxing', module: 'android-core'
          transitive = false
      }
      ...
  }
  </code></pre>
  
  <p>This configuration produces the following for "standard" build (works for another flavours):</p>
  
  <pre><code>    Duplicate class com.google.zxing.BarcodeFormat found in modules core-3.3.3.jar (com.google.zxing:core:3.3.3) and zxing-2.1.jar (:libgedi-0.190121.gpos800:)
      Duplicate class com.google.zxing.Binarizer found in modules core-3.3.3.jar (com.google.zxing:core:3.3.3) and zxing-2.1.jar (:libgedi-0.190121.gpos800:)
      Duplicate class com.google.zxing.BinaryBitmap found in modules core-3.3.3.jar (com.google.zxing:core:3.3.3) and zxing-2.1.jar (:libgedi-0.190121.gpos800:)
      Duplicate class com.google.zxing.ChecksumException found in modules core-3.3.3.jar (com.google.zxing:core:3.3.3) and zxing-2.1.jar (:libgedi-0.190121.gpos8
      ...
  </code></pre>
  
  <p>I tried to change the config to:</p>
  
  <pre><code>    standardImplementation(name: 'libgedi-0.190121.gpos800', ext: 'aar') {
          configurations {
              all*.exclude group: 'com.google.zxing'
          }
      }
  </code></pre>
  
  <p>The config above works only when i'm build the "standard" flavour. To another flavors, this error occurs:</p>
  
  <pre><code>error: package com.google.zxing.qrcode.decoder does not exist
  </code></pre>
  
  <p>What i'm doing wrong?</p>