Skip to content
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

Dokka 2.0 migration dokkaJavadoc issue #3988

Open
driessamyn opened this issue Jan 8, 2025 · 1 comment
Open

Dokka 2.0 migration dokkaJavadoc issue #3988

driessamyn opened this issue Jan 8, 2025 · 1 comment
Labels
bug runner: gradle plugin v2 Issues fixed by Dokka Gradle Plugin v2 - see https://github.com/Kotlin/dokka/issues/3131

Comments

@driessamyn
Copy link

Describe the bug
I am converting my project to Dokka 2, follwoing the documentation and running into a couple of issues.

gradle dokkaJavadoc executes succssfully but does not generate anything.

Adding

tasks.register<Jar>("dokkaJavadocJar") {
    dependsOn(tasks.dokkaJavadoc)
    from(tasks.dokkaJavadoc.flatMap { it.outputDirectory })
    archiveClassifier.set("javadoc")
}

as indicated in the docs here and running gradle dokkaJavadocJar gives the following error:

* What went wrong:
Execution failed for task ':kapper:dokkaJavadocJar'.
> Cannot query the value of this provider because it has no value available.
  The value of this provider is derived from:
    - task ':kapper:dokkaJavadoc' property 'outputDirectory'

The same error is produced for the dokkaHtmlJar example.

Expected behaviour

gradle dokkaJavadoc to generate javadocs
gradle dokkaJavadocJar to complete successfully.

To Reproduce

gradle dokkaJavadoc
gradle dokkaJavadocJar

Dokka configuration

id("org.jetbrains.dokka") version "2.0.0"
id("org.jetbrains.dokka-javadoc") version "2.0.0"

...

tasks.register<Jar>("dokkaHtmlJar") {
    dependsOn(tasks.dokkaHtml)
    from(tasks.dokkaHtml.flatMap { it.outputDirectory })
    archiveClassifier.set("html-docs")
}

tasks.register<Jar>("dokkaJavadocJar") {
    dependsOn(tasks.dokkaJavadoc)
    from(tasks.dokkaJavadoc.flatMap { it.outputDirectory })
    archiveClassifier.set("javadoc")
}

Installation

  • Operating system: macOS
  • Build tool: Gradle 8.12
  • Dokka version: 2.0.0
@driessamyn driessamyn added the bug label Jan 8, 2025
@vmishenev vmishenev added the runner: gradle plugin v2 Issues fixed by Dokka Gradle Plugin v2 - see https://github.com/Kotlin/dokka/issues/3131 label Jan 9, 2025
@driessamyn
Copy link
Author

FYI, full gradle file and project are here: https://github.com/driessamyn/kapper/blob/fix-dokka/lib/build.gradle.kts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug runner: gradle plugin v2 Issues fixed by Dokka Gradle Plugin v2 - see https://github.com/Kotlin/dokka/issues/3131
Projects
None yet
Development

No branches or pull requests

2 participants