Skip to content

Commit

Permalink
Update plugin dokka to v2 (#449)
Browse files Browse the repository at this point in the history
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [org.jetbrains.dokka](https://redirect.github.com/Kotlin/dokka) |
`1.9.20` -> `2.0.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.jetbrains.dokka:org.jetbrains.dokka.gradle.plugin/2.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jetbrains.dokka:org.jetbrains.dokka.gradle.plugin/2.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jetbrains.dokka:org.jetbrains.dokka.gradle.plugin/1.9.20/2.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jetbrains.dokka:org.jetbrains.dokka.gradle.plugin/1.9.20/2.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>Kotlin/dokka (org.jetbrains.dokka)</summary>

###
[`v2.0.0`](https://redirect.github.com/Kotlin/dokka/releases/tag/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](https://redirect.github.com/adamko-dev/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](https://redirect.github.com/Kotlin/dokka/milestone/31?closed=1)
milestone for the list of all changes.

#### Dokka's Gradle plugin v2 based on
[Dokkatoo](https://redirect.github.com/adamko-dev/dokkatoo)

> Please check the [migration
guide](https://kotl.in/dokka-gradle-migration) 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](https://docs.gradle.org/current/userguide/configuration_cache.html)
and [build
cache](https://docs.gradle.org/current/userguide/build_cache.html),
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](https://redirect.github.com/Kotlin/dokka/pull/3833))
- Add deprecated property to help migrate from JSON Dokka plugin
configuration
([https://github.com/Kotlin/dokka/pull/3877](https://redirect.github.com/Kotlin/dokka/pull/3877))
- Rename `dokkaPublicationDirectory` to `basePublicationsDirectory`
([https://github.com/Kotlin/dokka/pull/3876](https://redirect.github.com/Kotlin/dokka/pull/3876))
- Rename `dokkaModuleDirectory`, and mark as internal
([https://github.com/Kotlin/dokka/pull/3880](https://redirect.github.com/Kotlin/dokka/pull/3880))
- Update and add KDoc for DGPv2
([https://github.com/Kotlin/dokka/pull/3842](https://redirect.github.com/Kotlin/dokka/pull/3842))
- Remove DokkaPluginParametersBuilder
([https://github.com/Kotlin/dokka/pull/3872](https://redirect.github.com/Kotlin/dokka/pull/3872))
- Increase default max heap of Worker to 2G
([https://github.com/Kotlin/dokka/pull/3913](https://redirect.github.com/Kotlin/dokka/pull/3913))
- Remove the dependency of `dokkaGenerate` on `dokkaGenerateModule*`
([https://github.com/Kotlin/dokka/pull/3920](https://redirect.github.com/Kotlin/dokka/pull/3920))
- KT-71784 Fix classpath for KMP shared source sets
([https://github.com/Kotlin/dokka/pull/3942](https://redirect.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](https://redirect.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](https://blog.jetbrains.com/idea/2024/11/k2-mode-becomes-stable/).
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:

```properties
org.jetbrains.dokka.experimental.tryK2=true
```

##### Known limitations:

- Intersecting source roots
([#&#8203;3701](https://redirect.github.com/Kotlin/dokka/issues/3701))
and intersecting sample roots
([#&#8203;3373](https://redirect.github.com/Kotlin/dokka/issues/3373))
may cause issues.
- Kotlin/JS libraries compiled with the [legacy Kotlin/JS
compiler](https://kotlinlang.org/docs/js-ir-compiler.html) are not
supported
([#&#8203;3751](https://redirect.github.com/Kotlin/dokka/issues/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](https://redirect.github.com/Kotlin/dokka/issues/2888#issuecomment-2296230554)).
- KDoc links: resolution and rendering differences
([details](https://redirect.github.com/Kotlin/dokka/issues/2888#issuecomment-2296230554)).
- Inconsistent documentable rendering order
([#&#8203;3590](https://redirect.github.com/Kotlin/dokka/issues/3590)).
- Enum entries: anonymous and overridden methods are no longer rendered
([#&#8203;3129](https://redirect.github.com/Kotlin/dokka/issues/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](https://kotlinlang.org/docs/dokka-html.html#customization)
Dokka styles.

- We removed redundant wrappers like `navigation--inner` and
`navigation-title`.
- We reworked blocks such as `versions-dropdown` to make them more
accessible.
- We renamed classes like `navigation-controls--homepage` to improve
consistency. For example, it’s now called
`navigation-controls--btn_homepage`.

For more information, see the [pull
request](https://redirect.github.com/Kotlin/dokka/pull/3917/files).

The easiest way to update your current templates is to adjust the [new
templates](https://redirect.github.com/Kotlin/dokka/tree/master/dokka-subprojects/plugin-base/src/main/resources/dokka/templates)
to your needs.

#### Bugfixes

- Fix merging expect-actual declarations
([https://github.com/Kotlin/dokka/pull/3875](https://redirect.github.com/Kotlin/dokka/pull/3875))

#### Other changes

- Update the external link URL for stdlib
([https://github.com/Kotlin/dokka/pull/3938](https://redirect.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**:
Kotlin/dokka@v1.9.20...v2.0.0

</details>

---

### 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.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/chrisbanes/haze).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS42OS4zIiwidXBkYXRlZEluVmVyIjoiMzkuNjkuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
renovate[bot] authored Dec 16, 2024
1 parent 22e5851 commit 64a3edc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ baselineprofile = { id = "androidx.baselineprofile", version.ref = "androidx-ben
cacheFixPlugin = { id = "org.gradle.android.cache-fix", version = "3.0.1" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
compose-multiplatform = { id = "org.jetbrains.compose", version.ref = "compose-multiplatform" }
dokka = { id = "org.jetbrains.dokka", version = "1.9.20" }
dokka = { id = "org.jetbrains.dokka", version = "2.0.0" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
metalava = { id = "me.tylerbwong.gradle.metalava", version = "0.3.5" }
poko = { id = "dev.drewhamilton.poko", version = "0.17.2" }
Expand Down

0 comments on commit 64a3edc

Please sign in to comment.