dokkatoo icon indicating copy to clipboard operation
dokkatoo copied to clipboard

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

Open CLOVIS-AI opened this issue 7 months ago • 9 comments

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)

CLOVIS-AI avatar Nov 11 '23 15:11 CLOVIS-AI