title: In a Android gradle build, how to change the package name by build type?
body: <p>In a Android gradle build, I can simply let the build "overwrite" the package name by flavor like so:</p>
  
  <pre><code>productFlavors {
      free {
          applicationId "net.company.appname.free"
      }
  
      paid {
          applicationId "net.company.appname.paid"
      }
  }
  </code></pre>
  
  <p>Can I do the same by build type? </p>
  
  <p>It looks like I can only add suffixes:</p>
  
  <pre><code>buildTypes {
      debug {
          applicationIdSuffix ".debug"
  }
      release {
          ...
      }
  }
  </code></pre>