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

v2 migration docs missing some elements #4026

Closed
3flex opened this issue Feb 11, 2025 · 3 comments
Closed

v2 migration docs missing some elements #4026

3flex opened this issue Feb 11, 2025 · 3 comments
Labels

Comments

@3flex
Copy link
Contributor

3flex commented Feb 11, 2025

Describe the bug
I tried following the migration guide for v2 but got stuck at a few points migrating the following:

    tasks.withType<DokkaTask>().configureEach {
        suppressInheritedMembers = true
        failOnWarning = true
        outputDirectory = layout.projectDirectory.dir("../website/static/kdoc/detekt-gradle-plugin")

        dokkaSourceSets.configureEach {
            apiVersion = "1.4"
            externalDocumentationLink {
                url = URI("https://docs.gradle.org/current/javadoc/").toURL()
            }
        }
    }

The migration guide suggests tasks.withType<DokkaTask>().configureEach { is replaced with dokka { but some parameters aren't supported on the new extensions.

There is no guidance in deprecation warnings in the IDE, nor documentation in the migration guide, for these task properties:

  • failOnWarning
  • externalDocumentationLink

Expected behaviour
Migration guide should cover all changes to existing properties, whether they're now unsupported, or have a replacement.

Screenshots

To Reproduce
Set this in a project with dokka plugin applied:

dokka {
    failOnWarning = true
    outputDirectory = layout.projectDirectory.dir("../website/static/kdoc/detekt-gradle-plugin")

    dokkaSourceSets.configureEach {
        apiVersion = "1.4"
        externalDocumentationLink {
            url = URI("https://docs.gradle.org/current/javadoc/").toURL()
        }
    }

    dokkaPublications.configureEach {
        suppressInheritedMembers = true
    }
}

Dokka configuration

Installation

  • Operating system: Windows
  • Build tool: Gradle v8.12.1
  • Dokka version: 2.0.0

Additional context
Add any other context about the problem here

@3flex 3flex added the bug label Feb 11, 2025
@iseki0
Copy link

iseki0 commented Feb 18, 2025

Temp workaround for someone get stuck:

externalDocumentationLinks.create("") {
    url = URI.create("https://kotlinlang.org/api/kotlinx.serialization/")
}

@whyoleg
Copy link
Collaborator

whyoleg commented Feb 26, 2025

Hey! Thanks for the feedback!
It's true, that we missed some configuration options from initial guide, and we are currently working on updating it in #4025

Do you still need any help with migration?

@3flex
Copy link
Contributor Author

3flex commented Feb 26, 2025

I've migrated successfully, thanks!

@whyoleg whyoleg closed this as completed Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants