-
Notifications
You must be signed in to change notification settings - Fork 1k
Dokka multiproject example using Gradle #103
Dokka multiproject example using Gradle #103
Conversation
@pocmo
pocmo
Mar 25, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work when publishing this documentation online? Does this create relative URLs? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well actually that depends. Some links are created as relative, regardless of this config, but some are not. For example the "all types" page is created with absolute paths, but the links in specific class pages are created with relative paths. I think it'll change in future versions of Dokka.
As for the publishing - I think you can set the URL to your domain (http://example.com/...) and create package list URL with local path (file://projectname/...) and that should work.
I didn't test it, though
1533216
to
d7f388a
Compare
This fails for me when run locally.
$ ./gradlew.bat :projectA:dokka :projectB:dokka --stacktrace
> Task :projectB:dokka FAILED
...
1) Error injecting constructor, java.lang.RuntimeException: Exception while loading package-list from ExternalDocumentationLinkImpl(url=file://C:/Code/kotlin-examples/gradle/dokka-multiproject-gradle-example/projectA/build/dokka/project-a/, packageListUrl=file://C:/Code/kotlin-examples/gradle/dokka-multiproject-gradle-example/projectA/build/dokka/project-a/package-list)
...
Caused by: java.net.UnknownHostException: C
at org.jetbrains.dokka.PackageListProvider.loadPackageList(ExternalDocumentationLinkResolver.kt:137)
at org.jetbrains.dokka.PackageListProvider.<init>(ExternalDocumentationLinkResolver.kt:57)
... 83 more
The package-list
from projectA
has not been generated yet, that's probably why this error occurs. You should run ./gradlew dokka
or ./gradlew :projectA:dokka && ./gradlew :projectB:dokka
if you wanted to run separate tasks (although that's not the point of this example)
No description provided.