I have a task to create javadocs :

```
Task tCreateJavadocs = addTask(project, 'createJavadocs', Javadoc.class)
tCreateJavadocs.configure{
source = android.sourceSets.main.java.srcDirs
   classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
failOnError false
}

```

Now, I have a custom plugin where I move all my tasks and create a library as a result so I can apply the library to all projects. So, I want to move this task to custom plugin project as well. 
I write the task in custom plugin project like below:

```
Task tCreateJavadocs = addTask(project, 'createJavadocs', Javadoc.class)
tCreateJavadocs.configure{
source = project.android.sourceSets.main.java.srcDirs
   classpath += project.files(project.android.getBootClasspath().join(File.pathSeparator))
failOnError false
}

```

When I compile this with an Android Studio project, I get error 'Cause: android.compileSdkVersion is missing'.