kotlin-examples
kotlin-examples copied to clipboard
Dokka multiproject example using Gradle
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)