title: Updating Android build gradle version to 3.2.1 is causing error
body: <p>Everything worked fine until I updated build gradle to 3.2.1 and now I cannot build my project. I have a task that generates some variant specific code as defined below:</p>
  
  <pre><code>applicationVariants.all { variant -&gt;
      def generateClientIdConfigTask = project.tasks.create(..)
      ....
  
      variant.variantData.sourceGenTask.dependsOn generateClientIdConfigTask
  }
  </code></pre>
  
  <p>This line is causing following error:</p>
  
  <blockquote>
    <p>Caused by: groovy.lang.MissingPropertyException: No such property:
    sourceGenTask for class:
    com.android.build.gradle.internal.variant.ApplicationVariantData</p>
  </blockquote>
  
  <p>I already updated distributionUrl in the gradle wrapper as below:</p>
  
  <blockquote>
    <p>distributionUrl=https://services.gradle.org/distributions/gradle-4.6-
    all.zip</p>
  </blockquote>
  
  <p>Any help would be appreciated. Is there a different way to write <code>dependsOn</code>?</p>