devcrocod / korro

Korro documentation plugin
Apache License 2.0
6 stars 2 forks source link

Update to Dokka 2.0.0 (beta) #10

Open Jolanrensen opened 1 day ago

Jolanrensen commented 1 day ago

Korro is still based on Dokka/Kotlin 1.8.20. Now Kotlin 2.0 has been out a while, it's getting more and more out of date. Especially when new language features are being introduced.

I faced the same issue for my documentation preprocessor which also uses Dokka under the hood for the Gradle plugin. However, after a lot of trial and error, I managed to update it to Dokka 2.0.0-Beta, which uses Kotlin 2.0.20 to parse your project files. Dokka 2.0.0 should be released soon, but it doesn't hurt to prepare for it with the beta version already :).

You can see my PR for inspiration, but at the end of the day, not much had to change, just some util functions (which I ~stole~ borrowed from Dokka).

You can also decide to go the route of https://github.com/devcrocod/korro/issues/9 but I found it very difficult to initiate the Kotlin Analysis API from Gradle. Dokka already handles this for us atm.

devcrocod commented 21 hours ago

@Jolanrensen are there any issues in the dataframe related to the outfdated of Korro?

Jolanrensen commented 19 hours ago

As of now, not yet, so there's no big hurry. However, when we would start using a language feature of Kotlin 2.0+ in the example it would break.