_Question About_: Linking documentation from <http...
# dokka
v
_Question About_: Linking documentation from javadoc.io Hi! I'm configuring dokka for my team's Kotlin project, and I want to link the OpenTelemetry's documentation. For example, for the package
io.opentelemetry:opentelemetry-api
, the documentation is hosted here; however, for https://javadoc.io, I cannot find a link that would download the
package-list
(I have several OpenTelemetry modules hosted on javadoc.io). On the official dokka documentation, I only found examples for kotlinlang.org and docs.oracle.com hosts. Please suggest to me the way to link documentation from javadoc.io.
solved 1
1
I tried the following:
Copy code
dokka {
  dokkaSourceSets.configureEach { 
        externalDocumentationLinks.register("opentelemetry-api") {
            url("<https://javadoc.io/doc/io.opentelemetry/opentelemetry-api/>")
            packageListUrl("<https://javadoc.io/doc/io.opentelemetry/opentelemetry-api/package-list>")
        }
  }
}
But it fails with:
Copy code
Failed to download package-list from <https://javadoc.io/doc/io.opentelemetry/opentelemetry-api/package-list>, this might suggest that remote resource is not available, module is empty or dokka output got corrupted
a
It looks like javadoc.io doesn't support downloading the 'latest' version of the
element-list
file (
package-list
was renamed to
element-list
in Java 10, so OTel must've been built with a newer JDK). • https://javadoc.io/doc/io.opentelemetry/opentelemetry-api/1.55.0/element-list works • https://javadoc.io/doc/io.opentelemetry/opentelemetry-api/latest/element-list doesn't work
c
That's probably worth reporting it to the javadoc.io maintainer, he's not very quick to answer but he did fix things the last time I had a dokka-related issue on his site
o
It looks like javadoc.io doesn't support downloading the 'latest' version of the
element-list
file
works at my side (screen proof), but it should be
element-list
specifically,
package-list
is just an empty file And Dokka also follows redirects Could you recheck with the link changed to point to
element-list
?
Copy code
dokka {
  dokkaSourceSets.configureEach { 
        externalDocumentationLinks.register("opentelemetry-api") {
            url("<https://javadoc.io/doc/io.opentelemetry/opentelemetry-api/>")
            packageListUrl("<https://javadoc.io/doc/io.opentelemetry/opentelemetry-api/element-list>")
        }
  }
}
(and as a bonus, the Dokka issue about
element-list
support out-of-the-box without custom
packageListUrl
)
a
oh,
latest/element-list
works for me now too
v
thank you very much!