title: How to generate javadoc for android library when it has dependencies which are also aar libraries?
body: <p>I have android library project which depends on other android library projects. I need to generate javadoc for library but it fails because gradle puts to javadoc classpath path to .aar locations but javadoc expects .jar files.</p>
  
  <p>simplified gradle file:</p>
  
  <pre><code>android {
      compileSdkVersion 23
      buildToolsVersion "23.0.2"
  
      configurations {
          javadocDeps
      }
  
      defaultConfig {
          minSdkVersion 7
          targetSdkVersion 23
          versionCode 1
          versionName "0.1.0"
      }
  }
  
  dependencies {
      compile 'com.android.support:support-v4:23.2.0'
      compile 'com.android.support:appcompat-v7:23.2.0'
      compile 'com.nineoldandroids:library:2.4.0'
      compile 'com.annimon:stream:1.0.7'
      javadocDeps 'com.android.support:support-annotations:23.2.0'
      javadocDeps 'com.nineoldandroids:library:2.4.0'
      javadocDeps 'com.android.support:support-v4:23.2.0'
  }
  
  task sourcesJar(type: Jar) {
      from android.sourceSets.main.java.srcDirs
      classifier = 'sources'
  }    
  
  task javadoc(type: Javadoc, dependsOn: explodeAars) {
      source = android.sourceSets.main.java.srcDirs
      classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
      classpath += configurations.javadocDeps
  }
  
  task javadocJar(type: Jar, dependsOn: javadoc) {
      classifier = 'javadoc'
      from javadoc.destinationDir
  }
  
  artifacts {
      archives javadocJar
      archives sourcesJar
  }
  </code></pre>
  
  <p>3 solutions possible:</p>
  
  <p>1) somehow to add to the classpath path classes.jar from every aar library it depends build/intermidiates/exploded-aar/library/version/jars/classes.jar
  I don't know how to include these paths in javadoc task.</p>
  
  <p>2) manually unpack classes.jar from aar file and add them to classpath of javadoc task</p>
  
  <p>3) very dirty hack - hardcoded paths to library - but I think this is so WRONG.</p>
  
  <p>How to achieve 1 or 2 with gradle dsl?</p>