i am trying to use `include` via `dokkaSourceSets`...
# dokka
s
i am trying to use
include
via
dokkaSourceSets
, but i can't quite get it to work. code:
Copy code
tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial>().configureEach {
    dokkaSourceSets {
        configureEach {
            includes.from("module.md")
        }
    }
}
i
Hiya! Where is the file located? If it's a multimodule project, by default it'll look for the file in the root of the module You can try providing the absolute path to make sure that's the problem
And can you paste file contents here please? I don't remember for sure, but if it doesn't fail the build then it must see the file There's also an example you can have a look at: https://github.com/Kotlin/dokka/tree/master/examples/gradle/dokka-multimodule-example
s
@Ignat Beresnev if i tweak the filename it fails the build, so i know it is finding the markdown file
here's the file contents:
Copy code
# Module `base`

Module docs here
i've built it from that sample
i
Pretty sure the problem is with the header, try removing backticks, the example doesn't have any https://raw.githubusercontent.com/Kotlin/dokka/master/examples/gradle/dokka-multimodule-example/parentProject/childProjectB/Module.md
s
@Ignat Beresnev good idea but i'm not seeing any change 😞
Screenshot 2022-11-12 at 3.12.24 PM.png
that's the module which has a
module.md
it should be appearing between
server
and
Packages
, right? if i try to navigate to
module.html
it gives me a 404
i
No,
module.md
is not rendered like a separate page. Instead, it's parsed and the descriptions from it are rendered alongside module and package names
There's a bit of documentation for the format on kotlinlang: https://kotlinlang.org/docs/kotlin-doc.html#module-and-package-documentation Example from dokka-gradle-example:
Copy code
# Module Dokka Gradle Example

This is an example of how you can write module documentation with Dokka.

# Package demo

This package contains a few examples of Dokka usage.
s
@Ignat Beresnev i think the backticks fixed it! it seemed like it didn't at first, but now it's working great
i think i may have changed it in the wrong module and so my test was invalid
thank you for your help here!
🥳 1
239 Views