I have published an artifact with build.gradle below:
uploadArchives { repositories { mavenDeployer { repository(url: "file://maven") pom.groupId = 'com.totvnow' pom.artifactId = 'tonedetect-lib' pom.version = '0.1.0' } } } task androidJavadocs(type: Javadoc) { source = android.sourceSets.main.java.srcDirs classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) } task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { classifier = 'javadoc' from androidJavadocs.destinationDir } artifacts { archives androidJavadocsJar }
And I successfully get javadoc files files in repo directory:
tonedetect-lib-0.1.0-javadoc.jar tonedetect-lib-0.1.0-javadoc.jar.md5 tonedetect-lib-0.1.0-javadoc.jar.sha1
But when I use it in another module's build.gradle:
buildscript { repositories { jcenter() maven { url 'somepath\\maven' } } dependencies { classpath 'com.android.tools.build:gradle:1.2.3' } } allprojects { repositories { jcenter() maven { url 'somepath\\maven' } } }
and
dependencies { compile 'com.totvnow:tonedetect-lib:0.1.0' }
The Javadoc does not pop up when I use Ctrl-Q on a class in the library. Java codes are fine, and when I click on the class Android Studio gives me the decompiled code without any problem. Also, other dependencies such as support library v4 shows Javadoc correctly.
Does anyone know possible reasons?
I have no Android Studio experience. However after searching on the internet for a bit I found to following things:
These things may potentially help to get it working:
Applying the
idea
plugin and configuring it to download the JavaDoc:File -> Other Settings -> Default Settings... -> Maven -> Importing
and check the boxes to download the sources and documentation.