title: Error in my build.gradle with the clean() method
body: <p>I was messing around with my <code>build.gradle</code> trying to add Google's library into my build.gradle for my project because a random error popped up saying i needed to update my <code>com.google.android.gms</code> to 10.2.0 which gave an error so I tried to input google's maven thing.. anyways here's the code with the error:</p>
  
  <pre><code>    // Top-level build file where you can add configuration options common to all sub-projects/modules.
      buildscript {
          repositories {
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:2.3.3'
          classpath 'com.google.gms:google-services:3.1.2'
  
          // NOTE: Do not place your application dependencies here; they belong in the individual module build.gradle files
      }
  
      allprojects {
          repositories {
              jcenter()
              maven {
                  url "https://maven.google.com"
              }
  
          }
      }
  
      task clean(type: Delete) {
          delete rootProject.buildDir
      }
  }
  </code></pre>
  
  <p>The error is "<code>Could not find method clean() for arguments [{type=c;ass org.gradle.api.tasks.Delete}, build_djvq5gyz4y6fnevmcpa9beri7$_run_closure1$_closer5@cf00d12] on object of type org.gradle.api.internal.initialization.DefaultScriptHandler.</code>" and it's for the <code>task clean(type: Delete) { delete rootProject.buildDir }</code> code. </p>
  
  <p>Please help! I don't know what else to do at this point arg!</p>