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

Aggregating modules doesn't work without manually adding a dependency on all-modules-page-plugin #14

Closed
aSemy opened this issue Feb 20, 2023 · 3 comments · Fixed by #128
Labels
🌱 contributions welcome Good for newcomers, pull requests welcome enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@aSemy
Copy link
Contributor

aSemy commented Feb 20, 2023

Currently in order to create a Dokka publication that aggregates subprojects, it's required to manually add a dependency on all-modules-page-plugin

plugins {
  kotlin("jvm") version "1.7.20" apply false
  id("dev.adamko.dokkatoo") version "0.0.2-SNAPSHOT"
}

dependencies {
  dokkatoo(project(":parentProject:childProjectA"))
  dokkatoo(project(":parentProject:childProjectB"))

  // A dependency on all-modules-page-plugin is required for aggregating subprojects.
  // A version is not required, Dokkatoo will automatically add one.
  dokkatooPluginHtml("org.jetbrains.dokka:all-modules-page-plugin")
}

This dependency should be added automatically.

@aSemy aSemy added the enhancement New feature or request label Apr 5, 2023
martinbonnin added a commit to martinbonnin/dokkatoo that referenced this issue May 3, 2023
martinbonnin added a commit to martinbonnin/dokkatoo that referenced this issue May 3, 2023
I understand this is required at the moment 

See adamko-dev#14
aSemy pushed a commit that referenced this issue May 3, 2023
Add all-modules-page-plugin workaround in README.md

See #14
@hfhbd
Copy link

hfhbd commented May 28, 2023

Does this issue also include the adding all modules manually using dependencies { dokkatoo(projects.foo) }? With big projects and adding new modules it is easy to forget to add the new module in the root project too. Would using a BuildService help to register the projects automatically?

@aSemy aSemy modified the milestone: v1.4.0 Jun 2, 2023
@aSemy
Copy link
Contributor Author

aSemy commented Jun 4, 2023

@hfhbd So you want Dokkatoo to automatically set up a multi-module aggregation, if possible? I think that's worth investigating, so please make a new issue. I think it would be possible for Dokkatoo to implement that using default dependencies. Such a feature would be dependent on fixing this issue.

@aSemy
Copy link
Contributor Author

aSemy commented Dec 16, 2023

I've pushed a change #127 that makes adding the dependency slightly easier and less verbose. Dokkatoo will now automatically add a version, so all that's required is:

dependencies {
  dokkatoo(project(":parentProject:childProjectA"))
  dokkatoo(project(":parentProject:childProjectB"))

  // A dependency on all-modules-page-plugin is required at the moment.
  // A version is not required, Dokkatoo will automatically add one.
  dokkatooPluginHtml("org.jetbrains.dokka:all-modules-page-plugin")
}

The version will be set from the version set in the Dokkatoo extension:

// build.gradle.kts

dokkatoo {
  versions {
    jetbrainsDokka.set("1.9.10")
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 contributions welcome Good for newcomers, pull requests welcome enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants