Reputation: 9488
I'm using dokka to auto generate javadoc for me. Though when it encounters any class not from my project it uses fully qualified names.
Is it possible to use only class names and make dokka provide a link for it? For example:
java.lang.String getName()
I'd want instead of java.lang.String
to have String
with link to Java doc
My gradle config:
ext.simpleName = project.name.substring(project.name.indexOf('-') + 1, project.name.size())
dokka {
outputFormat = 'javadoc'
outputDirectory = "${rootProject.buildDir}/javadoc/$project.ext.simpleName"
linkMapping {
dir = 'src/main/java'
url = "https://github.com/mibac138/ArgParser/blob/master/$project.ext.simpleName/src/main/java"
}
linkMapping {
dir = 'src/main/kotlin'
url = "https://github.com/mibac138/ArgParser/blob/master/$project.ext.simpleName/src/main/kotlin"
}
}
Also, what exactly is linkMapping
? I'm not sure what it does.
Upvotes: 3
Views: 596
Reputation: 141
For linking to 3rd party libraries you should use externalDocumentationLink
pointing to Oracle Java documentation:
dokka{
externalDocumentationLink {
url = new URL("https://docs.oracle.com/javase/8/docs/api/")
}
If you use Kotlin and Java in the same project fully qualified names for Java classes may be necessary
Upvotes: 2