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.0 Multimodule Configuration Requires Manual Dependencies, Breaking Gradle Build Conventions #3991

Open
leinardi opened this issue Jan 10, 2025 · 2 comments
Labels
enhancement An issue for a feature or an overall improvement runner: Gradle plugin An issue/PR related to Dokka's Gradle plugin

Comments

@leinardi
Copy link

Describe the bug
After migrating from Dokka Gradle Plugin (DGP) version 1.x to 2.0.0 in a multimodule project, it is no longer possible to rely on Gradle's build conventions for specifying which modules should generate documentation. Previously, modules could be configured automatically by applying the plugin and using a simple dokkaHtmlMultiModule block in the root build.gradle.kts. In version 2.0.0, manual configuration of dokka dependencies in the root build.gradle.kts is required, making it challenging to manage projects with dynamically loaded modules.

Expected behaviour
It should be possible to easily specify which modules generate documentation, ideally by marking them directly in their respective build.gradle.kts files, without the need for manual dependency declarations in the root build.gradle.kts. This would allow automation and better integration with Gradle build conventions.

Screenshots
N/A

To Reproduce
Steps to reproduce the behavior:

  1. Set up a multimodule project with Dokka 2.0.0 and Gradle v8.12.
  2. Attempt to configure the project to generate documentation for select modules using only the root build.gradle.kts and Gradle build conventions without manually specifying the dokka dependencies in the root build.gradle.kts.

Installation

  • Operating system: Ubuntu 24.04
  • Build tool: Gradle v8.12
  • Dokka version: 2.0.0

Additional context
The inability to rely on Gradle build conventions for specifying modules adds complexity to managing multimodule projects with dynamic and static modules. Having to maintain a separate source of truth for Dokka dependencies in the root build.gradle.kts hinders automation and introduces redundancy. A feature or mechanism to mark a project as a Dokka dependency directly in its build.gradle.kts file would greatly enhance usability.

@leinardi leinardi added the bug label Jan 10, 2025
@adam-enko
Copy link
Member

@adam-enko adam-enko added enhancement An issue for a feature or an overall improvement runner: Gradle plugin An issue/PR related to Dokka's Gradle plugin and removed bug labels Jan 13, 2025
@Laxystem
Copy link

For my project, Spock, I fixed this by creating a docs subproject, and calling :docs:dokkaGenerate instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An issue for a feature or an overall improvement runner: Gradle plugin An issue/PR related to Dokka's Gradle plugin
Projects
None yet
Development

No branches or pull requests

3 participants