I'm trying to add sample code to my API Reference.
I followed the pattern highlighted here https://androidessence.com/contributing-to-kotlin Was able to create my sample project and all the code runs, duplicating the _sampleUtils that the the kotlin stdlib source uses.
I configured my module to include the sample in the dokka configuration.
tasks.dokkaHtml {
dokkaSourceSets.configureEach {
samples.from("$projectDir/../module-samples/test/samples/SampleFile.kt")
}
}
The sample correctly loads into and is displayed in the documentation for the function with a run button.
When I hit run though, it just comes back with Unresolved reference
for all the symbols in my library. It also could not find assertPrint method from the _samplesUtils.kt file.
I don't see any other settings in the Dokka configuration for samples to make it include jar files for the library being documented.