Hey all, I can't seem to get multimodule working. ...
# dokka
b
Hey all, I can't seem to get multimodule working. When I add this to my top-level gradle I just get a
Unresolved reference: dokkaHtmlMultiModule
error. Any ideas?
m
Did you apply the plugin in the plugins block or added it to buildscript
b
Yes, it's in the plugins block for each module. (But not at the top-level)
m
i think that you have to apply the plugin to the toplevel. Plugins should be propagated to other modules
b
Hmmm, that doesn't seem to work. I have two multiplatform modules that just happen to be in the same gradle project. Is that the correct setup?
j
I am applying dokka at root level and in each Multiplatform module
b
@Javier And where do you put the multimodule dokka task?
j
I think I was doing both, but I extracted some code to precompiled plugins and I think I am applying it on root now
Yeah, now I am using it at root level only
b
Hmmm. Ok, for me the task doesn't work in the main/root build.gradle.kt
kts*
m
Thats weird, can i take a look on the project? Is it available somewhere?
b
Unforuntately, it's not open source. Are there any good example projects out there? that might be helpful
j
Screenshot_20210326-145245.jpg
I am just doing that
That precompiled plugin is used at root build.gradle.kts, but you can just add that code directly
b
Cool, that works.
Though it doesn't find any of the sub modules so that page is empty. Do you need to manually setup subproject dependencies?
m
btw @Javier you can migrate to 1.4.30 and you wouldn’t need to rename this file 😄
j
Ah, it is indeed 1.4.30, I didn't see it is not longer necessary, I will try it later, thank you 😄
@bsimmons what do you mean with subproject dependencies?
b
I just mean that the page looks empty like this:
j
Ah, it is not happening to me
I am doing nothing special, just applying the dokka at the root and having a few subprojects with multiplatform plugin
b
Yeah, I might be doing it wrong then. I have two somewhat independent modules in an empty gradle project. I'll try restructuring a bit
Hmmm, if I add submodule, it will only document the submodule but doesn't include the parent
j
I have a project I have to update so it is not using the last dokka and it is using the plugin in subprojects too
but maybe it can help to you
here you can see the docs
btw when I update it removing all the unnecessary things, I will come back here
here it is using only at root
I have to remove the rename from there and try
b
Great, thanks for the examples! I'll see if I can follow
🙂 1