Skip to content

Commit 905286d

Browse files
committed
Update Dokka version references to 2.1.0 (#4297)
- update examples to use DGPv1 (cherry picked from commit 706b7c3)
1 parent a3376d1 commit 905286d

File tree

31 files changed

+107
-67
lines changed

31 files changed

+107
-67
lines changed

CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ Bug reports, feature requests and questions are welcome. Submit issues [here](ht
2323

2424
## Submitting PRs
2525

26-
Dokka has extensive [Developer Guides](https://kotlin.github.io/dokka/2.0.0/developer_guide/introduction/)
26+
Dokka has extensive [Developer Guides](https://kotlin.github.io/dokka/2.1.0/developer_guide/introduction/)
2727
documentation
28-
which goes over the development [Workflow](https://kotlin.github.io/dokka/2.0.0/developer_guide/workflow/) and
29-
[Dokka's architecture](https://kotlin.github.io/dokka/2.0.0/developer_guide/architecture/architecture_overview/),
28+
which goes over the development [Workflow](https://kotlin.github.io/dokka/2.1.0/developer_guide/workflow/) and
29+
[Dokka's architecture](https://kotlin.github.io/dokka/2.1.0/developer_guide/architecture/architecture_overview/),
3030
which can help you understand how to achieve what you want and where to look.
3131

3232
All development (both new features and bugfixes) takes place in the `master` branch, it contains sources for the next
@@ -64,16 +64,16 @@ not take much time (~2-5 minutes), so please make sure they pass before submitti
6464
### Use/test locally built Dokka
6565

6666
Below you will find a bare-bones instruction on how to use and test locally built Dokka. For more details and examples,
67-
visit [Workflow](https://kotlin.github.io/dokka/2.0.0/developer_guide/workflow/) topic.
67+
visit [Workflow](https://kotlin.github.io/dokka/2.1.0/developer_guide/workflow/) topic.
6868

69-
1. Publish a custom version of Dokka to Maven Local: `./gradlew publishToMavenLocal -Pversion=2.0.0-my-fix-SNAPSHOT`
69+
1. Publish a custom version of Dokka to Maven Local: `./gradlew publishToMavenLocal -Pversion=2.1.0-my-fix-SNAPSHOT`
7070
2. In the project for which you want to generate documentation add Maven Local as a buildscript/dependency
7171
repository (`mavenLocal()`)
7272
3. Update your Dokka dependency to the version you've just published:
7373

7474
```kotlin
7575
plugins {
76-
id("org.jetbrains.dokka") version "2.0.0-my-fix-SNAPSHOT"
76+
id("org.jetbrains.dokka") version "2.1.0-my-fix-SNAPSHOT"
7777
}
7878
```
7979

@@ -139,7 +139,7 @@ It's possible to run integration tests with a custom Dokka version published to
139139
via `org.jetbrains.dokka.integration_test.dokkaVersionOverride` Gradle property:
140140

141141
```bash
142-
./gradlew :dokka-integration-tests:gradle:testExternalProjectKotlinxCoroutines -Porg.jetbrains.dokka.integration_test.dokkaVersionOverride=2.0.0-dev-329
142+
./gradlew :dokka-integration-tests:gradle:testExternalProjectKotlinxCoroutines -Porg.jetbrains.dokka.integration_test.dokkaVersionOverride=2.1.0-dev-329
143143
```
144144

145145
Additionally, it's possible to open the Gradle integration test projects in IDEA.

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Apply the Gradle plugin for Dokka in the root build script of your project:
4444

4545
```kotlin
4646
plugins {
47-
id("org.jetbrains.dokka") version "2.0.0"
47+
id("org.jetbrains.dokka") version "2.1.0"
4848
}
4949
```
5050

@@ -66,7 +66,7 @@ Apply Gradle plugin for Dokka in the root project:
6666

6767
```groovy
6868
plugins {
69-
id 'org.jetbrains.dokka' version '2.0.0'
69+
id 'org.jetbrains.dokka' version '2.1.0'
7070
}
7171
```
7272

@@ -100,7 +100,7 @@ Add the Dokka Maven plugin to the `plugins` section of your POM file:
100100
<plugin>
101101
<groupId>org.jetbrains.dokka</groupId>
102102
<artifactId>dokka-maven-plugin</artifactId>
103-
<version>2.0.0</version>
103+
<version>2.1.0</version>
104104
<executions>
105105
<execution>
106106
<phase>pre-site</phase>
@@ -139,7 +139,7 @@ which aims to improve documentation experience on the Android platform:
139139

140140
```kotlin
141141
dependencies {
142-
dokkaPlugin("org.jetbrains.dokka:android-documentation-plugin:2.0.0")
142+
dokkaPlugin("org.jetbrains.dokka:android-documentation-plugin:2.1.0")
143143
}
144144
```
145145

@@ -150,7 +150,7 @@ dependencies {
150150

151151
```groovy
152152
dependencies {
153-
dokkaPlugin 'org.jetbrains.dokka:android-documentation-plugin:2.0.0'
153+
dokkaPlugin 'org.jetbrains.dokka:android-documentation-plugin:2.1.0'
154154
}
155155
```
156156

@@ -169,7 +169,7 @@ dependencies {
169169
<plugin>
170170
<groupId>org.jetbrains.dokka</groupId>
171171
<artifactId>android-documentation-plugin</artifactId>
172-
<version>2.0.0</version>
172+
<version>2.1.0</version>
173173
</plugin>
174174
</dokkaPlugins>
175175
</configuration>
@@ -216,7 +216,7 @@ implement plugins for missing or very specific features that are not provided ou
216216
Learn more about Dokka plugins and their configuration in [Dokka plugins](https://kotlinlang.org/docs/dokka-plugins.html).
217217

218218
If you want to learn how to develop Dokka plugins, see
219-
[Developer guides](https://kotlin.github.io/dokka/2.0.0/developer_guide/introduction/).
219+
[Developer guides](https://kotlin.github.io/dokka/2.1.0/developer_guide/introduction/).
220220

221221
Dokka allows you to extend its functionality by [configuring custom plugins](https://github.com/Kotlin/dokka/blob/ae3840edb4e4afd7b3e3768a5fddfe8ec0e08f31/examples/gradle-v2/custom-dokka-plugin-example/demo-library/build.gradle.kts),
222222
which enable additional processing or modifications to the documentation generation process.

docs-developer/docs/developer_guide/workflow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ will review API changes thoroughly, so please make sure it's intentional and rat
4343
Having built Dokka locally, you can publish it to `mavenLocal()`. This will allow you to test your changes in another
4444
project as well as debug code remotely.
4545

46-
1. Publish a custom version of Dokka to Maven Local: `./gradlew publishToMavenLocal -Pversion=2.0.0-my-fix-SNAPSHOT`.
46+
1. Publish a custom version of Dokka to Maven Local: `./gradlew publishToMavenLocal -Pversion=2.1.0-my-fix-SNAPSHOT`.
4747
This version will be propagated to plugins that reside inside Dokka's project (`mathjax`, `kotlin-as-java`, etc),
4848
and its artifacts should appear in `~/.m2`
4949
2. In the project you want to generate documentation for or debug on, add maven local as a plugin/dependency
@@ -56,7 +56,7 @@ repositories {
5656
3. Update your Dokka dependency to the version you've just published:
5757
```kotlin
5858
plugins {
59-
id("org.jetbrains.dokka") version "2.0.0-my-fix-SNAPSHOT"
59+
id("org.jetbrains.dokka") version "2.1.0-my-fix-SNAPSHOT"
6060
}
6161
```
6262

docs/topics/dokka-migration.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
[//]: # (title: Migrate to Dokka Gradle plugin v2)
22

3-
> The Dokka Gradle plugin v2 is an [Experimental](https://kotlinlang.org/docs/components-stability.html#stability-levels-explained) feature.
4-
> It may be changed at any time. We appreciate your feedback on [GitHub](https://github.com/Kotlin/dokka/issues).
5-
>
6-
{style="warning"}
7-
83
The Dokka Gradle plugin (DGP) is a tool for generating comprehensive API documentation for Kotlin projects built with Gradle.
94

105
DGP seamlessly processes both Kotlin's KDoc comments and Java's Javadoc comments to extract information and create
@@ -38,6 +33,12 @@ Ensure that your project meets the minimum version requirements:
3833

3934
### Enable DGP v2
4035

36+
> Starting from Dokka 2.1.0, DGP v2 is enabled by default.
37+
> If you are using or updating to Dokka 2.1.0 or later,
38+
> you can skip this step and go directly to [Migrate your project](#migrate-your-project).
39+
>
40+
{style="note"}
41+
4142
Update the Dokka version to 2.0.0 in the `plugins {}` block of your project’s `build.gradle.kts` file:
4243

4344
```kotlin
@@ -233,7 +234,7 @@ documentedVisibilities.set(
233234
documentedVisibilities(VisibilityModifier.Public)
234235
```
235236

236-
Additionally, use DGP v2's [utility function](https://github.com/Kotlin/dokka/blob/v2.0.0/dokka-runners/dokka-gradle-plugin/src/main/kotlin/engine/parameters/HasConfigurableVisibilityModifiers.kt#L14-L16) to add documented visibilities:
237+
Additionally, use DGP v2's [utility function](https://github.com/Kotlin/dokka/blob/v2.1.0/dokka-runners/dokka-gradle-plugin/src/main/kotlin/engine/parameters/HasConfigurableVisibilityModifiers.kt#L14-L16) to add documented visibilities:
237238

238239
```kotlin
239240
fun documentedVisibilities(vararg visibilities: VisibilityModifier): Unit =
@@ -522,7 +523,7 @@ dokka {
522523
For an example of the DGP v2 configuration, see the
523524
[Dokka's versioning plugin](https://github.com/Kotlin/dokka/tree/master/examples/gradle-v2/versioning-multimodule-example).
524525

525-
Dokka 2.0.0 allows you to extend its functionality by [configuring custom plugins](https://github.com/Kotlin/dokka/blob/ae3840edb4e4afd7b3e3768a5fddfe8ec0e08f31/examples/gradle-v2/custom-dokka-plugin-example/demo-library/build.gradle.kts).
526+
DGP v2 allows you to extend its functionality by [configuring custom plugins](https://github.com/Kotlin/dokka/blob/ae3840edb4e4afd7b3e3768a5fddfe8ec0e08f31/examples/gradle-v2/custom-dokka-plugin-example/demo-library/build.gradle.kts).
526527
Custom plugins enable additional processing or modifications to the documentation generation process.
527528

528529
### Share Dokka configuration across modules
@@ -759,7 +760,7 @@ Here is a list of the plugin `id` and Gradle task that correspond to each format
759760

760761
### Address deprecations and removals
761762

762-
* **Output format support:** Dokka 2.0.0 only supports HTML and Javadoc output. Experimental formats like Markdown and Jekyll are no longer supported.
763+
* **Output format support:** DGP v2 only supports HTML and Javadoc output. Experimental formats like Markdown and Jekyll are no longer supported.
763764
* **Collector task:** `DokkaCollectorTask` has been removed. Now, you need to generate the documentation separately for
764765
each subproject and then [aggregate the documentation](#update-documentation-aggregation-in-multi-module-projects) if necessary.
765766

docs/v.list

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<vars>
66
<var name="dokkaVersion"
7-
value="2.0.0"
7+
value="2.1.0"
88
type="string"/>
99
<var name="kotlinVersion"
1010
value="2.1.0"

dokka-integration-tests/gradle/projects/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Projects used to run integration tests could be opened in or build independently by following these steps:
44

55
1. open `gradle.properties` file of a specific project and change commented variables:
6-
1. `dokka_it_kotlin_version` to required version of Kotlin Gradle Plugin, e.g 2.0.0
7-
2. `dokka_it_dokka_version` to required version to Dokka Gradle plugin, e.g 2.0.0
6+
1. `dokka_it_kotlin_version` to required version of Kotlin Gradle Plugin, e.g 2.1.0
7+
2. `dokka_it_dokka_version` to required version to Dokka Gradle plugin, e.g 2.1.0
88
3. replace all other commented properties if needed, like `dokka_it_android_gradle_plugin_version`
99
2. open `settings.gradle.kts` and replace `apply(from = "template.settings.gradle.kts")` with
1010
`apply(from = "../template.settings.gradle.kts")` (so the path should be prefixed with `../`)

dokka-subprojects/analysis-kotlin-symbols/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ To build it with an override version of Analysis API, the property
2424

2525
### Entry point
2626

27-
The main entry point is `DefaultSymbolToDocumentableTranslator` (this is an extension for [the extension point](https://kotlin.github.io/dokka/2.0.0/developer_guide/architecture/extension_points/core_extensions/#sourcetodocumentabletranslator) ), that is used by the Dokka core to build Documentable model by a source set.
27+
The main entry point is `DefaultSymbolToDocumentableTranslator` (this is an extension for [the extension point](https://kotlin.github.io/dokka/2.1.0/developer_guide/architecture/extension_points/core_extensions/#sourcetodocumentabletranslator) ), that is used by the Dokka core to build Documentable model by a source set.
2828

2929
Across running Dokka we keep `StandaloneAnalysisAPISession` and `KtSourceModule` instances from Analysis API into `KotlinAnalysis`.
3030
`KotlinAnalysis` is used in `DefaultSymbolToDocumentableTranslator` and other services that need an additional analysis.
@@ -51,4 +51,4 @@ By default, we run unit tests on TeamCity against the latest Analysis API by a s
5151
- You can use the `gradle :publishToMavenLocal` task to publish Dokka locally.
5252
- To build Dokka without running testing, using the `gradle assemble` task is recommended since the tests are time-consuming.
5353

54-
See the detailed guide [here](https://kotlin.github.io/dokka/2.0.0/developer_guide/workflow/).
54+
See the detailed guide [here](https://kotlin.github.io/dokka/2.1.0/developer_guide/workflow/).

dokka-subprojects/plugin-kotlin-as-java/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The Kotlin as Java plugin is published to maven central as a
88
[separate artifact](https://mvnrepository.com/artifact/org.jetbrains.dokka/kotlin-as-java-plugin):
99

1010
```text
11-
org.jetbrains.dokka:kotlin-as-java-plugin:2.0.0
11+
org.jetbrains.dokka:kotlin-as-java-plugin:2.1.0
1212
```
1313

1414
**This plugin is at its early stages**, so you may experience issues and encounter bugs. Feel free to

dokka-subprojects/plugin-mathjax/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ The MathJax plugin is published to Maven Central as a
2323
[separate artifact](https://mvnrepository.com/artifact/org.jetbrains.dokka/mathjax-plugin):
2424

2525
```text
26-
org.jetbrains.dokka:mathjax-plugin:2.0.0
26+
org.jetbrains.dokka:mathjax-plugin:2.1.0
2727
```

dokka-subprojects/plugin-versioning/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ You can apply the versioning plugin the same way as other Dokka plugins:
1919

2020
```kotlin
2121
dependencies {
22-
dokkaHtmlPlugin("org.jetbrains.dokka:versioning-plugin:2.0.0")
22+
dokkaHtmlPlugin("org.jetbrains.dokka:versioning-plugin:2.1.0")
2323
}
2424
```
2525

@@ -33,7 +33,7 @@ plugin within subprojects as well as in their parent project.
3333

3434
```groovy
3535
dependencies {
36-
dokkaHtmlPlugin 'org.jetbrains.dokka:versioning-plugin:2.0.0'
36+
dokkaHtmlPlugin 'org.jetbrains.dokka:versioning-plugin:2.1.0'
3737
}
3838
```
3939

@@ -55,7 +55,7 @@ plugin within subprojects as well as in their parent project.
5555
<plugin>
5656
<groupId>org.jetbrains.dokka</groupId>
5757
<artifactId>versioning-plugin</artifactId>
58-
<version>2.0.0</version>
58+
<version>2.1.0</version>
5959
</plugin>
6060
</dokkaPlugins>
6161
</configuration>
@@ -68,15 +68,15 @@ plugin within subprojects as well as in their parent project.
6868
<summary>CLI</summary>
6969

7070
You can find the versioning plugin's artifact on
71-
[mvnrepository](https://mvnrepository.com/artifact/org.jetbrains.dokka/versioning-plugin/2.0.0) or by browsing
72-
[maven central repository](https://repo1.maven.org/maven2/org/jetbrains/dokka/versioning-plugin/2.0.0)
71+
[mvnrepository](https://mvnrepository.com/artifact/org.jetbrains.dokka/versioning-plugin/2.1.0) or by browsing
72+
[maven central repository](https://repo1.maven.org/maven2/org/jetbrains/dokka/versioning-plugin/2.1.0)
7373
directly, and pass it to `pluginsClasspath`.
7474

7575
Via command line arguments:
7676

7777
```Bash
78-
java -jar dokka-cli-2.0.0.jar \
79-
-pluginsClasspath "./dokka-base-2.0.0.jar;...;./versioning-plugin-2.0.0.jar" \
78+
java -jar dokka-cli-2.1.0.jar \
79+
-pluginsClasspath "./dokka-base-2.1.0.jar;...;./versioning-plugin-2.1.0.jar" \
8080
...
8181
```
8282

@@ -86,9 +86,9 @@ Via JSON configuration:
8686
{
8787
...
8888
"pluginsClasspath": [
89-
"./dokka-base-2.0.0.jar",
89+
"./dokka-base-2.1.0.jar",
9090
"...",
91-
"./versioning-plugin-2.0.0.jar"
91+
"./versioning-plugin-2.1.0.jar"
9292
],
9393
...
9494
}
@@ -136,7 +136,7 @@ import org.jetbrains.dokka.versioning.VersioningConfiguration
136136

137137
buildscript {
138138
dependencies {
139-
classpath("org.jetbrains.dokka:versioning-plugin:2.0.0")
139+
classpath("org.jetbrains.dokka:versioning-plugin:2.1.0")
140140
}
141141
}
142142

@@ -233,7 +233,7 @@ dokkaHtml {
233233
<summary>CLI</summary>
234234

235235
```Bash
236-
java -jar dokka-cli-2.0.0.jar \
236+
java -jar dokka-cli-2.1.0.jar \
237237
...
238238
-pluginsConfiguration "org.jetbrains.dokka.versioning.VersioningPlugin={\"version\": \"1.5\", \"versionsOrdering\": [\"1.5\", \"1.4\", \"1.3\", \"1.2\", \"1.1\", \"alpha-2\", \"alpha-1\"], \"olderVersionsDir\": \"documentation/version\", \"olderVersions\": [\"documentation/alpha/alpha-2\", \"documentation/alpha/alpha-1\"], \"renderVersionsNavigationOnAllPages\": true}"
239239

@@ -294,12 +294,12 @@ import org.jetbrains.dokka.versioning.VersioningConfiguration
294294

295295
buildscript {
296296
dependencies {
297-
classpath("org.jetbrains.dokka:versioning-plugin:2.0.0")
297+
classpath("org.jetbrains.dokka:versioning-plugin:2.1.0")
298298
}
299299
}
300300

301301
dependencies {
302-
dokkaPlugin("org.jetbrains.dokka:versioning-plugin:2.0.0")
302+
dokkaPlugin("org.jetbrains.dokka:versioning-plugin:2.1.0")
303303
}
304304

305305
tasks.dokkaHtml {

0 commit comments

Comments
 (0)