spatial-k
spatial-k copied to clipboard
Update plugin dokka to v2
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| org.jetbrains.dokka | 1.9.10 -> 2.0.0 |
Release Notes
Kotlin/dokka (org.jetbrains.dokka)
v2.0.0: 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 (https://github.com/Kotlin/dokka/pull/3833)
- Add deprecated property to help migrate from JSON Dokka plugin configuration (https://github.com/Kotlin/dokka/pull/3877)
- Rename
dokkaPublicationDirectorytobasePublicationsDirectory(https://github.com/Kotlin/dokka/pull/3876) - Rename
dokkaModuleDirectory, and mark as internal (https://github.com/Kotlin/dokka/pull/3880) - Update and add KDoc for DGPv2 (https://github.com/Kotlin/dokka/pull/3842)
- Remove DokkaPluginParametersBuilder (https://github.com/Kotlin/dokka/pull/3872)
- Increase default max heap of Worker to 2G (https://github.com/Kotlin/dokka/pull/3913)
- Remove the dependency of
dokkaGenerateondokkaGenerateModule*(https://github.com/Kotlin/dokka/pull/3920) - KT-71784 Fix classpath for KMP shared source sets (https://github.com/Kotlin/dokka/pull/3942)
- Fix DGP/KMP integration, so Dokka can 'see' code from shared source sets in target source sets (https://github.com/Kotlin/dokka/pull/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.
Potential differences between the outputs of K1 and K2:
While the output of K2 analysis aims to align with K1, there are some differences to be aware of:
- Java synthetic properties: rendering may vary (details).
- KDoc links: resolution and rendering differences (details).
- Inconsistent documentable rendering order (#3590).
- Enum entries: anonymous and overridden methods are no longer rendered (#3129).
- Other differences may arise due to variations in type inference between K1 and K2.
HTML format
Dokka 2.0.0 introduces some changes to HTML output. We updated the structure of some elements and classes, particularly in the navigation and sidebar, to improve accessibility and simplify maintenance. These changes only affect you if you previously customized Dokka styles.
- We removed redundant wrappers like
navigation--innerandnavigation-title. - We reworked blocks such as
versions-dropdownto make them more accessible. - We renamed classes like
navigation-controls--homepageto improve consistency. For example, it’s now callednavigation-controls--btn_homepage.
For more information, see the pull request.
The easiest way to update your current templates is to adjust the new templates to your needs.
Bugfixes
- Fix merging expect-actual declarations (https://github.com/Kotlin/dokka/pull/3875)
Other changes
- Update the external link URL for stdlib (https://github.com/Kotlin/dokka/pull/3938)
Feedback
We would appreciate your feedback!
- Please report any feedback or problems https://kotl.in/dokka-issues
- Chat with the community visit #dokka in https://kotlinlang.slack.com/ (To sign up visit https://kotl.in/slack)
Full Changelog: https://github.com/Kotlin/dokka/compare/v1.9.20...v2.0.0
v1.9.20: 1.9.20
General bugfixes
- Fixed sealed interfaces not having the
sealedkeyword in signatures (https://github.com/Kotlin/dokka/issues/2994) - Fixed incorrect links in multi-module projects with non-unique package names (https://github.com/Kotlin/dokka/issues/2272). Huge thanks to @EddieRingle!
- Fixed member extensions not being shown on index pages in certain scenarios (https://github.com/Kotlin/dokka/issues/3187)
- Fixed Java's inner classes not having the
innerkeyword in Kotlin signatures (https://github.com/Kotlin/dokka/issues/2793) - Fixed Java's
@paramtag not working with type parameters (https://github.com/Kotlin/dokka/issues/3199) - Fixed Dokka failing in KMP projects when the JVM source set is suppressed (https://github.com/Kotlin/dokka/issues/3209)
HTML format
- Provide an ability to add a custom homepage link to the header, more details in https://github.com/Kotlin/dokka/issues/2948#issuecomment-1976723089
- Fixed tab selection resetting after navigating to a different page (https://github.com/Kotlin/dokka/issues/2899)
- Fixed inline code not always being aligned with the surrounding text (https://github.com/Kotlin/dokka/issues/3228)
- Fixed the "No options found" text in search being barely visible (https://github.com/Kotlin/dokka/issues/3281)
- Fixed empty HTML tags being rendered for no reason (https://github.com/Kotlin/dokka/pull/3343, https://github.com/Kotlin/dokka/issues/3095)
Runners
Gradle Plugin
- Mark tasks as not compatible with Gradle configuration cache, second try (https://github.com/Kotlin/dokka/pull/3438). Thanks to @3flex for noticing and fixing the problem!
Maven Plugin
- Fixed
dokka:helpbeing absent (https://github.com/Kotlin/dokka/issues/3035). Thanks to @aSemy! - Fixed the source links configuration not working (https://github.com/Kotlin/dokka/pull/3046). Thanks to @freya022 for fixing this one!
CLI runner
- Allow using relative paths in the
sourceRootsconfiguration option (https://github.com/Kotlin/dokka/issues/2571)
Plugin API
- Provide an extension point to customize the rendering of code blocks in HTML format (https://github.com/Kotlin/dokka/issues/3244)
Other:
- Make sure
wasm-jsandwasm-wasitargets introduced in Kotlin 1.9.20 are supported (https://github.com/Kotlin/dokka/issues/3310) - Avoid concurrent invocations of Kotlin compiler's API due to the compiler API itself not always being thread safe (https://github.com/Kotlin/dokka/issues/3151). No noticeable performance loss is expected.
- Bump dependencies to the latest versions (https://github.com/Kotlin/dokka/pull/3231, https://github.com/Kotlin/dokka/pull/3206, https://github.com/Kotlin/dokka/pull/3204)
- Fix a documentation link (https://github.com/Kotlin/dokka/pull/3213). Thanks to @SubhrajyotiSen for noticing and fixing it!
- Various build and project structure improvements (https://github.com/Kotlin/dokka/pull/3174, https://github.com/Kotlin/dokka/issues/3132). Enormous thanks to @aSemy for the help!
See Dokka 1.9.20 milestone for the list of all changes.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.