archiveBaseName applied to all build types
<p>I've the following app <code>build.gradle</code></p>

<pre><code>android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "io.gresse.hugo.anecdote"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 12
        versionName "1.0.0"
    }

    buildTypes {
        release {
            archivesBaseName = "anecdote-" + defaultConfig.versionName
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        }
        debug {
            archivesBaseName = "anecdote-DEBUGDEBUGDEBUG-"
        }
    }
}
</code></pre>

<p>When I execute <code>./gradlew assembleRelease assembleDebug</code></p>

<p>The output .apk are:<br>
 - <code>anecdote-DEBUGDEBUGDEBUG-debug-unaligned.apk</code><br>
 - <code>anecdote-DEBUGDEBUGDEBUG-debug.apk</code><br>
 - <code>anecdote-DEBUGDEBUGDEBUG-release-unaligned.apk</code><br>
 - <code>anecdote-DEBUGDEBUGDEBUG-release.apk</code>  </p>

<p>What I wanted:<br>
 - <code>anecdote-DEBUGDEBUGDEBUG-debug-unaligned.apk</code><br>
 - <code>anecdote-DEBUGDEBUGDEBUG-debug.apk</code><br>
 - <code>anecdote-1.0.0-release-unaligned.apk</code><br>
 - <code>anecdote-1.0.0-release.apk</code>  </p>

<p>Is there any way to apply the <strong>archiveBaseName</strong> to a specific <strong>build types</strong> or is it a bug? </p>

<p>Thanks,</p>