Ellen Spertus

09/03/2022, 1:00 AM
I'll be teaching an Intro CS class using Kotlin and want to install good habits, such as writing KDoc and running Dokka. Unfortunately, this doesn't seem to be simple in IntelliJ. The default build system apparently does not support Dokka, and it's not provided in the Gradle and Maven new project templates. I see that I could have students install the Dokka plugin and then manually apply the plugin. What is the least painful way to get new students using KDoc/Dokka?
I'm working on create a template project that uses Gradle but can't figure out how to include all
files, regardless of what directories they appear in (the way all source code is included, regardless of directory). I tried:
Copy code
tasks.withType<org.jetbrains.dokka.gradle.DokkaTask>().configureEach {
    dokkaSourceSets {
        named("main") {
but this only looks for
in the root directory:
Copy code
C:\Users\ellen\IdeaProjects\gradle-test\ (The system cannot find the file specified)
How would I make it look for files named
in any
directory? (If
isn't a good name, please let me know a better one. I'm not planning on using modules.)

Vadim Mishenev

09/05/2022, 2:46 PM
Something like:
Copy code
includes.from(fileTree(project.rootDir) {
🙏 1
👍 1

Ellen Spertus

09/06/2022, 2:45 PM
Thank you so much, @Vadim Mishenev! That did it.
👍 1