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
Possible to generate multi module projects using the CLI? #2770
Comments
Things I tried that didn't work:
I also read the CLI runner code. As far as I can tell, the code just doesn't take into account multi module. That said, I'm new to the project so I may have missed something. Please let me know if there is in fact a way to do what I want :) |
It should be possible, although not quite straightforward and easy. Frankly I've neither done it, nor heard of anyone succeeding, nor would I recommend doing it 😅 Is there any reason you want to use the CLI runner for this as opposed to using the Gradle plugin? Maybe we could spend less time on resolving the blocker? If you're determined to use the CLI runner, here's my thoughts: We've re-written documentation in #2728, it's not out yet, but you can see the preview for the CLI runner here, it should help you with configuration and understanding of what's going out. Note that some configuration properties I'm going to mention are not covered in the documentation as this use case should be quite rare. You can read how First, Partial tasks are run for each module separately, and then the parent MultiModule task is run, which processes outputs from all partial tasks and produces ready-to-use documentation. Partial tasks are run with DokkaConfiguration#delayTemplateSubstitution set to So it looks like you'd have to have separate JSON configurations for each module (with Then you'd need a separate JSON configuration for the MultiModule run. You'd probably have to supply templating-plugin and all-module-page-plugin to For the MultiModule run only, it looks like you'll have to configure DokkConfiguration#module property and provide locations of the modules. CLI runner's JSON configuration is deserialized as With all of that done, it should either work as expected or you should be close. You can look at the Gradle plugin, its tasks and configuration for examples, although that's also not as easy to extract information from it. You can use |
Thanks for the reply @IgnatBeresnev. Your suggestion worked. The one slight gotcha for me, was that the |
I'm glad it worked 👍 Could you please describe your use case for the CLI runner? Why not use the Gradle plugin? We'd like to know more why people use it so that we can either improve the CLI runner itself or resolve problems in the Gradle plugin that stop people from using it. |
Oh, my project doesn’t use gradle as the build system. The CLI runner is really useful if you have a different build system eg CMake, bazel, buck, so would be great if you kept investing in it :) |
Question
I'm following the Command Line guide to create docs. The docs are a bit out of date, but I was able to get it working. However, I'm not totally sure how I might use it to generate multi module docs. Are there any examples I can follow?
Installation
The text was updated successfully, but these errors were encountered: