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

Focus Dokka Multi-Module on Relevant Modules (Exclude bom & app) #192

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

teogor
Copy link
Owner

@teogor teogor commented Apr 15, 2024

Optimized DokkaHtmlMultiModule Task Execution

This pull request refines the execution of the dokkaHtmlMultiModule task to generate documentation only for desired modules within the project.

Previous Approach:

Previously, the code relied on the following logic:

tasks.dokkaHtmlMultiModule {
  childProjects.values.forEach {
    dependsOn(":${it.name}:dokkaHtmlMultiModule")
  }
}

This approach triggered the dokkaHtmlMultiModule task for all child projects, potentially generating documentation for modules that don't require it (e.g., BOM or application module).

Updated Approach:

The code has been updated to selectively execute the task for specific modules:

tasks.dokkaHtmlMultiModule {
  childProjects.values.map { it.name }.filter {
    it != "app" && it != "bom"
  }.forEach {
    val taskPath = ":${it}:dokkaHtmlMultiModule"
    dependsOn(taskPath)
  }
}

This revised approach:

  • Filters out the "app" and "bom" modules from the processing list.
  • Generates documentation only for the remaining child projects.

Benefits:

  • Improved build efficiency by excluding unnecessary documentation generation.
  • Reduced build time by focusing on relevant modules.
  • Streamlined documentation process.

@teogor teogor added @documentation Improvements or additions to documentation @environment labels Apr 15, 2024
@teogor teogor added this to the 1.0.0-alpha05 milestone Apr 15, 2024
@teogor teogor self-assigned this Apr 15, 2024
@teogor teogor merged commit 72461d4 into main Apr 15, 2024
5 checks passed
@zeobot zeobot bot deleted the dokka-task-refinement branch April 15, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@documentation Improvements or additions to documentation @environment
Projects
Development

Successfully merging this pull request may close these issues.

1 participant