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

Documentation is not generated on 1.8.20 with KMP Multimodule project #3107

Closed
Nek-12 opened this issue Aug 6, 2023 · 6 comments
Closed
Labels

Comments

@Nek-12
Copy link

Nek-12 commented Aug 6, 2023

Describe the bug
The documentation is not generated despite the task completing successfully with Kotlin 1.9, Dokka 1.8.20 and a KMP project

Expected behaviour
The documentation is generated or the task fails explaining what went wrong

Screenshots
You can visit the javadocs site to see how it looks:
https://opensource.respawn.pro/FlowMVI/javadocs/index

To Reproduce
See the project https://github.com/respawn-app/FlowMVI

Dokka configuration
Configuration of dokka used to reproduce the bug

plugins {
    alias(libs.plugins.dokka)
}

subprojects {
    apply(plugin = rootProject.libs.plugins.dokka.id)

    dependencies {
        dokkaPlugin(rootProject.libs.dokka.android)
    }

    tasks {
        withType<AbstractDokkaTask> {
            val className =
                "org.jetbrains.kotlin.gradle.targets.native.internal.CInteropMetadataDependencyTransformationTask"

            @Suppress("UNCHECKED_CAST")
            val taskClass = Class.forName(className) as Class<Task>
            parent?.subprojects?.forEach {
                dependsOn(it.tasks.withType(taskClass))
            }
        }

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

tasks {
        dokkaHtmlMultiModule.configure {
            moduleName.set(rootProject.name)
            outputDirectory.set(buildDir.resolve("dokka"))
    }
}

Installation

  • Operating system: macOS
  • Build tool: Gradle 8.2
  • Dokka version: 1.8.20
  • Kotlin 1.9

Are you willing to provide a PR?
I don't know what's wrong to provide a PR

@Nek-12 Nek-12 added the bug label Aug 6, 2023
Nek-12 added a commit to respawn-app/KMPUtils that referenced this issue Aug 7, 2023
@IgnatBeresnev
Copy link
Member

IgnatBeresnev commented Aug 16, 2023

Would you be able to tell us what exact problem you're running into? Maybe a stacktrace or a description of what is happening? In case it's a new problem that we haven't encountered yet.

@Nek-12
Copy link
Author

Nek-12 commented Aug 16, 2023

I already described my problem in the issue description. The documentation is not generated. No stacktraces are produced The console prints the tasks as if they were executed.

@vmishenev vmishenev added the format: Javadoc An issue/PR related to Dokka's Javadoc output format or the Javadoc comments in general label Aug 16, 2023
@Nek-12
Copy link
Author

Nek-12 commented Aug 16, 2023

This also applies to the html documentation

@IgnatBeresnev IgnatBeresnev removed the format: Javadoc An issue/PR related to Dokka's Javadoc output format or the Javadoc comments in general label Aug 16, 2023
@IgnatBeresnev
Copy link
Member

I've cloned the project locally, commented out the scary Dokka configuration blocks, and run ./gradlew clean dokkaHtmlMultiModule --no-configuration-cache. The documentation is successfully built:

2023-08-16_19-42-13


Is there any reason you're configuring CInteropMetadataDependencyTransformationTask and task dependencies?

@Nek-12
Copy link
Author

Nek-12 commented Aug 17, 2023

Yes, because of #2977

I'm puzzled about the fact that you were able to build the project without running into that issue. Anything else you changed?

@IgnatBeresnev
Copy link
Member

Dokka 1.9.0 has been released, and it includes some workarounds for this problem. See the following issue for details:


To avoid the spread of information and have updates in a single place, I'll close this issue and a few others as duplicates in favour of #3153.

@IgnatBeresnev IgnatBeresnev closed this as not planned Won't fix, can't repro, duplicate, stale Sep 1, 2023
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