title: Publishing and consuming both debug and release libraries to Maven for Android
body: <p>Given that now you can get Gradle to generate both <code>mylib-debug.aar</code> and <code>mylib-release.aar</code> in <code>build\outputs\aar</code> by issuing the <code>./gradle build</code> for a libary, when I try to publish both types to Maven I get an error unless I classify them.</p>
  
  <pre><code>publishing {
      publications {
          aar(MavenPublication) {
              groupId 'com.mydomain'
              artifactId 'mylib'
              version '0.1'
              artifact bundleRelease { classifier 'release' }
              artifact bundleDebug { classifier 'debug' }
              ...
              //code for source and pom
              ...
          }
      }
  </code></pre>
  
  <p>Issuing <code>./gradle publishToMavenLocal</code> I end up with these files in <code>~/.m2/repository</code></p>
  
  <pre><code>+--com
    +--mydomain
      +--mylib
        +--0.1
           + mylib-0.1.pom
             mylib-0.1-debug.aar
             mylib-0.1-release.aar
             mylib-0.1-sources.jar
             maven-metadata-local.xml
  </code></pre>
  
  <p>Now when I try to import this using</p>
  
  <pre><code>dependencies {
      debugImplementation  group: 'com.mydomain', name:  'mylib', version: '0.1', configuration: 'debug'
      releaseImplementation  group: 'com.mydomain', name:  'mylib', version: '0.1', configuration: 'release'
  </code></pre>
  
  <p>it doesn't work.  I have tried other combinations, but have found nothing that works.</p>