title: Gradle custom Type : Default Task "error: cannot find symbol"
body: <p>I want to create a SimpleTask Gradle with JAVA. However I cannot compile my projet because "import org.gradle.api.DefaultTask' is not found.
  GradleVersion : 6.3</p>
  
  <p>As said on documentation I create a class on root/buildSrc/src/main/java/SimpleTask.java</p>
  
  <p>With this code I have an :  "error: cannot find symbol" symbol: class DefaultTask.</p>
  
  <pre><code>import org.gradle.api.DefaultTask;
  import org.gradle.api.tasks.TaskAction;
  
  public class SimpleTask extends DefaultTask {
  
  }
  </code></pre>
  
  <p>I've tried to add the dependency (but same effect)</p>
  
  <pre><code>dependencies {
      // https://mvnrepository.com/artifact/org.gradle/api
      implementation group: 'org.gradle', name: 'api', version: '1.0'
  </code></pre>