-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to merge Javadocs of dependency projects that aren't subprojects? #3995
Comments
Hey!
Yes, overall aggregation inside Dokka is possible only over sources, so of subprojects and dependencies are used for resolution and external links. |
The libraries I'm writing are written in Kotlin, but geared towards Java developers, who are used to javadocs. So ideally I could provide javadocs and keep the fact that the library is in Kotlin an implementation detail.
This is mildly hacky, but I came up with the following code for the subproject: // Redefine `dokkaJavadoc` to:
// - Depend on the root project's task for merging the docs of all the projects
// - Forward that task's output to this task's output
tasks.named("dokkaJavadoc").configure {
actions.clear()
val dokkaJavadocCollector = rootProject.tasks["dokkaJavadocCollector"]
dependsOn(dokkaJavadocCollector)
val outputDirectory = project.layout.buildDirectory.dir("dokka/javadoc")
doLast {
copy {
from(dokkaJavadocCollector.outputs.files)
into(outputDirectory)
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
}
outputs.dir(outputDirectory)
} That way the By the way, I noticed that when using Dokka Gradle plugin v1 you get deprecation warnings and are told to migrate to v2, but then the v2 pages says:
Which then makes me nervous about migrating to v2. I'm wondering if v2 is actually is unstable as this text makes it seem? |
Question
For example, I have the following sibling projects :
Where
openai-java
depends onopenai-java-client-okhttp
andopenai-java-core
. I would likeopenai-java
's Javadoc to include the Javadocs ofopenai-java-client-okhttp
andopenai-java-core
.I was looking at the Gradle Dokka documentation and it seems like it's only possible to use the
dokkaJavadocCollector
to merge together Javadocs of subprojects, but not arbitrary project dependencies.Is what I want possible somehow?
Installation
The text was updated successfully, but these errors were encountered: