title: Gradle versionName and versionCode not working after 3.0 update
body: <pre><code>    flavorDimensions "app"
      productFlavors {
          dev {
              resValue "string", "base_url", "http://mydevurl/"
              dimension "app"
          }
          prod {
              resValue "string", "base_url", "http://myprodurl/"
              dimension "app"
          }
      }
      applicationVariants.all { variant -&gt;
          def flavor = variant.mergedFlavor
          def versionName
          if (variant.buildType.isDebuggable()) {
              versionName = "debug_0.1.1"
          }else{
              versionName = "0.1.1"
          }
          flavor.versionName = versionName
          flavor.versionCode = 50
      }
  </code></pre>
  
  <p>Above gradle setup was working fine till Gradle 3.0 update. Couldn't find anything related in the website referred. How to manage this dynamic version control based on this new <code>flavorDimension</code> change?</p>