title: Wear App and with custom build type with applicationIdSuffix
body: <p>I have an app where I'd like to add an Android Wear app extension. The main app has three build types (debug, beta and release). Beta builds have an <code>applicationIdSuffix</code> which allows me to install the play-store version and the current development version in parallel on the same device. This all worked fine until I added the wear app.</p>
  
  <p>The main app`s <code>build.gradle</code> looks like this:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      ...
      defaultConfig {
          ...
          applicationId "com.example.mainApp"
          ...
      }
      buildTypes {
          debug {
              applicationIdSuffix '.debug'                
          }
          beta {
              applicationIdSuffix '.beta'
          }
          release {
          }
      }
  }
  
  dependencies {
      ...
      wearApp project(':wear')
  }
  </code></pre>
  
  <p>The Wear-App has the same build types with the same applicationIdSuffix values. However, when I build the beta app (by calling <code>gradle assembleBeta</code>) the build process builds <code>:wear:assembleRelease</code> instead of <code>:wear:assembleBeta</code> which is why I get the following error message during build:</p>
  
  <pre><code>FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':app:handleBetaMicroApk'.
  &gt; The main and the micro apps do not have the same package name.
  </code></pre>
  
  <p>How can I tell the build process to build the correct build type when packaging the main app with build type <code>beta</code>?</p>