title: Cannot add task 'clean' as a task with that name already exists
body: <p>I have a project that I started in <code>Java</code> on Android Studio and I want to continue it in <code>Kotlin</code>. So I configured my project to integrating Kotlin by this way "Configure Kotlin in Project"</p>
  
  <p><a href="https://i.stack.imgur.com/1JnXa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1JnXa.png" alt="enter image description here"></a></p>
  
  <p>After that Android Studio changed my twice <code>build.gradle</code> files. But from that moment my sync started to fail.</p>
  
  <p>there is my <code>build.gradle</code> file where the error occurs :</p>
  
  <p><strong>before</strong> :</p>
  
  <pre><code>buildscript {
  
      repositories {
          google()
          jcenter()
          mavenCentral()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.3.0'
  
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
          classpath 'com.google.gms:google-services:4.2.0'
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  
  <p><strong>after :</strong> </p>
  
  <pre><code>buildscript {
      ext.kotlin_version = '1.3.21'
      repositories {
          google()
          jcenter()
          mavenCentral()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.3.1'
  
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
          classpath 'com.google.gms:google-services:4.2.0'
      }
  }
  
  plugins {
      id 'org.jetbrains.kotlin.jvm' version '1.3.21'
  }
  
  repositories {
      mavenCentral()
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
      }
  }
  
  dependencies {
      implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
  }
  compileKotlin {
      kotlinOptions {
          jvmTarget = "1.8"
      }
  }
  compileTestKotlin {
      kotlinOptions {
          jvmTarget = "1.8"
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  
  <p>I get the following error :</p>
  
  <blockquote>
    <p>Cannot add task 'clean' as a task with that name already exists.</p>
  </blockquote>
  
  <p>When I remove the task clean I get the error :</p>
  
  <blockquote>
    <p>1</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/R2XyC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R2XyC.png" alt="enter image description here"></a></p>