I have followed the tutorial to create a new plugi...
# dokka
c
I have followed the tutorial to create a new plugin, and added it to another project with
dependencies { dokkaPlugin("…") }
. My goal is to generate a new output format, but when I run
./gradlew tasks
in my test module, no task is generated to use my new format. Should I need to create a Gradle task to trigger my plugin (and if so, how?) or should the gradle plugin automatically pick up the new format and generate tasks for it itself?
It seems that the Dokka Gradle plugin has all formats hardcoded, but all of these methods are
private
😕 https://github.com/Kotlin/dokka/blob/d4d457d357627fd8100e4f0d47868020485996ec/dokk[…]assic/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaPlugin.kt
a
why not use Dokkatoo? :) You just have to create a subclass of DokkatooFormatPlugin.kt
c
Well, all my actual projects use Dokkatoo, but I thought it'd be easier to make a ‘pure’ Dokka plugin and port it later... ...but if Dokkatoo makes it this simple 😇
a
technically all of Dokkatoo's formats use the same pattern, so it should be simple. But then I implemented every part of it, so I'm biased! You'd be the first external implementor 🤞
❤️ 1
btw, it won't be long until porting between Dokka and Dokkatoo won't mean anything 😁 https://github.com/Kotlin/dokka/pull/3695
🚀 1
c
Ohhhh
Interesting!
m
Can’t wait 🙂
c
@Adam S what's the plan for after Dokkatoo is integrated into Dokka? Will it keep existing, or will it be entirely replaced?
a
most likely I'll archive it. I might strip it down to only include features that aren't in the official Dokka Gradle.
c
Could you give us a few months to migrate? It's going to take a while 😅
a
oh yeah, for sure
even if I archive the GitHub repo the artifacts will still exist :)
how many projects do you need to migrate from DokkaClassic to Dokkatoo?
c
I meant, release new versions when new Dokka versions are released 😇
Hm, ~10 I think
Well, builds. Projects probably 3–4× that
a
oh wow, that's quite a lot
I thought you used Dokkatoo for everything :)
c
I do! I need the configuration cache, I can't live without it
a
ahh yeah, that's what I thought
c
Everything here uses Dokkatoo: https://opensavvy.dev/libraries/overview.html
And I have 3–4 repos I maintain in other places
a
in that case, if you're only using HTML, it'll be zero effort for you to migrate (at least, keeping the DSL the same is the current plan. So you'll just have to update the plugin ID. But that could change... Dokkatoo isn't merged yet...)
c
Hmm, so ~15 repositories actually. Damn I should stop
a
btw Dokkatoo isn't linked to a specific Dokka Engine version. You can override the specific Dokka version that Dokkatoo uses in the build config dsl:
Copy code
// build.gradle.kts

dokkatoo {
  versions {
    jetbrainsDokka.set("1.9.20")
  }
}
👀 1