Skip to content

Empty publication when Kotlin plugin applied to subprojects, but not to root project (with apply=false) #123

@CLOVIS-AI

Description

@CLOVIS-AI

Hi!

I have a project in which I applied the Dokkatoo plugin. I'm currently refactoring it to use convention plugins, and in the process something strange broke. I don't know how to debug it.

The project is structured as follows:

playground/
    app/build.gradle.kts
    core/build.gradle.kts
    build.gradle.kts

The :core project has Dokkatoo. The :app project doesn't. The root project has a dependency on :core.


Previously, I ran ./gradlew :dokkatooGeneratePublicationHtml to generate the HTML output. However, now, it only generates an empty build/dokka/core directory.

If I run ./gradlew dokkatooGenerate, I get the following link printed in the terminal: http://localhost:63342/playground/build/dokka/html/index.html. Opening that link in the browser does allow me to browse the generated documentation. However, that file doesn't exist. The build/dokka directory only contains a subdirectory called core, there are no other files.

What could be the cause? I don't understand how this can happen.


Reproduction:

Other useful links:

  • Code of the opensavvyConventions.plugins.base convention plugin: here (unrelated to Dokka)
  • Code of the opensavvyConventions.plugins.root convention plugin: here (applies the plugin + the dependencies workaround)
  • Code of the opensavvyConventions.plugins.kotlin.library convention plugin: here (applies the plugin + configures the project name + includes the README, etc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked-by:GradleBlocked by a bug/missing feature in Gradleformat:htmlRelates to Dokka HTML publication format

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions