Sourced from org.jetbrains.dokka's releases.
2.0.0
Dokka 2.0.0 focuses on simplifying configuration and preparing for support of future Kotlin language features. Key highlights include:
- Dokka Gradle Plugin v2: revamped Gradle plugin based on Dokkatoo.
- Experimental K2 Analysis: support for K2 compiler frontend.
- HTML Improvements: better accessibility and easier customization.
More details about each of the changes below. See Dokka 2.0.0 milestone for the list of all changes.
Dokka's Gradle plugin v2 based on Dokkatoo
Please check the migration guide for the update procedure and give feedback!
Dokka 2.0.0 introduces significant improvements to Dokka Gradle plugin, aligning more closely with Gradle best practices:
- Adopts Gradle types, which leads to better performance.
- Uses an intuitive top-level DSL configuration instead of a low-level task-based setup, which simplifies the build scripts and their readability.
- Takes a more declarative approach to documentation aggregation, which makes multi-project documentation easier to manage.
- Uses a type-safe plugin configuration, which improves the reliability and maintainability of your build scripts.
- Fully supports Gradle configuration cache and build cache, which improves performance and simplifies build work.
Changes from Dokka 2.0.0-Beta
- Forward Dokka Generator messages to Gradle logger (Kotlin/dokka#3833)
- Add deprecated property to help migrate from JSON Dokka plugin configuration (Kotlin/dokka#3877)
- Rename
dokkaPublicationDirectory
tobasePublicationsDirectory
(Kotlin/dokka#3876)- Rename
dokkaModuleDirectory
, and mark as internal (Kotlin/dokka#3880)- Update and add KDoc for DGPv2 (Kotlin/dokka#3842)
- Remove DokkaPluginParametersBuilder (Kotlin/dokka#3872)
- Increase default max heap of Worker to 2G (Kotlin/dokka#3913)
- Remove the dependency of
dokkaGenerate
ondokkaGenerateModule*
(Kotlin/dokka#3920)- KT-71784 Fix classpath for KMP shared source sets (Kotlin/dokka#3942)
- Fix DGP/KMP integration, so Dokka can 'see' code from shared source sets in target source sets (Kotlin/dokka#3814)
Dokka's K2 analysis
Dokka 2.0.0 introduces K2 analysis, which is currently in an experimental stage. Dokka's K2 analysis leverages Kotlin's K2 compiler frontend for analysing code and uses the same shared Analysis API, which is used in IntelliJ IDEA’s K2 mode. The output with K2 analysis should mostly match that of K1 analysis, but there may be minor differences. We are actively working towards stabilizing K2 analysis and are planning to enable K2 analysis by default in future.
To opt in to Dokka's K2 analysis, add the following flag to your project's
gradle.properties
file:org.jetbrains.dokka.experimental.tryK2=true
Known limitations:
- Intersecting source roots (#3701) and intersecting sample roots (#3373) may cause issues.
- Kotlin/JS libraries compiled with the legacy Kotlin/JS compiler are not supported (#3751).
We would greatly value your feedback if you encounter any of these limitations.
... (truncated)
3be1aa6
Update Kotlin/Dokka version references to 2.0.0 (#3957)47ee7fb
Update the version to the 2.0.0 releasea2fe934
Avoid configuration resolution error for v2 migration helper task (#3950)a6e5b03
Update DGPv2 examples to use Kotlin 2.1.0 (#3949)94eec02
Run integration tests with Kotlin 2.1.0 (#3865)2b63314
KT-71784 Fix classpath for KMP shared source sets (#3942)17871a0
Add new tests for KDoc links (#3947)f728e3a
feat: implemented new UI for Navbar and Table of Contents (#3917)9577dc7
Edit some tests to check the stability of the order (#3943)ae68eee
Add a test for #3702 (#3941)