title: Gradle Android Plugin - add custom flavor attribute?
body: <p>Is there any way to add custom attributes to productFlavor or buildType in android plugin for gradle?
  I'd like to have such additional flexibility in configuration of buildVariants, so that I can check my custom property when specifying tasks for buildVariants.</p>
  
  <pre><code>productFlavors {
      flavorGroups "drm", "storeType"
      googlePlay {
          flavorGroup "storeType"
          buildConfig "public static final String TARGET_STORE = \"google\";"
      }
      samsungApps {
          flavorGroup "storeType"
          buildConfig "public static final String TARGET_STORE = \"samsung\";"
      }
  
      platformDrm {
          flavorGroup "drm"
      }
  
      widevineAppDrm {
          flavorGroup "drm"
          minSdkVersion 9
          useWidevineAppDrmLib true
      }
  </code></pre>
  
  <p>}</p>
  
  <p>so here you can see I've added custom attribute "useWidevineAppDrmLib" to build flavor.
  It would be nice to see the same attribute in buildVariant.mergedFlavor, so that I can check that attribute value and do build additional tasks, such as package additional .so files when the attribute is set to true:</p>
  
  <p><code>android.applicationVariants.each { variant -&gt;
  if(variant.mergedFlavor.useWidevineAppDrmLib ) {
    ... // add copy .so task
    }
  }</code></p>
  
  <p>maybe there is a way to do that already but I didn't find out yet...
  checking build variant name for substring (flavor name) works for me, but it looks dirty.</p>
  
  <p>Ideally I'd like to have a map of custom attributes of different types for buildType and productFlavor.</p>