Well, I think I've hit a dead end. I defined my ow...
# dokka
t
Well, I think I've hit a dead end. I defined my own
FormatDescriptor
for a style that does everything the html format does excpet using
KotlinWebsiteSampleProcessingService
. That seems straight forward - define dokka/format/myformatname.properties and away we go. But I think the way the gradle-dokka plugin is looking up resources, I'm never going to be able to package my`FormatDescriptor` and its property files in a separate jar. I tried doing this and the packaging looks correct, and the jar for my formatter is on the build's classpath (so, in the buildscript/dependencies section), but I keep getting exceptions that it can't be found. https://github.com/Kotlin/dokka/blob/d1eee305ef865eee8848989363db3f0fed63e11a/core/src/main/kotlin/Utilities/ServiceLocator.kt#L33
y
what are you trying to accomplish? are you trying to generate the Kotlin Web site with samples, or are you trying to reuse the same mechanism for your own documentation?
t
I’m trying to use the same mechanism in my plain html docs. Namely converting assertPrintln to println. That way I can run my samples as tests and have them look like regular non test code.
s
You doing it right way. Problem here that dokka core running in separate classloader, not in Gradle one, you need to override
dokkaFatjar
property of dokka task, and pass Gradle build coordinates there, which will point to your format package with dependency on dokka-fatjar
t
Thank you! I will try it! :)