Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Kotlin/Dokka version references to 2.0.0 #3957

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Bug reports, feature requests and questions are welcome. Submit issues [here](ht

## Submitting PRs

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

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

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

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

```kotlin
plugins {
id("org.jetbrains.dokka") version "1.9.20-my-fix-SNAPSHOT"
id("org.jetbrains.dokka") version "2.0.0-my-fix-SNAPSHOT"
}
```

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Apply the Gradle plugin for Dokka in the root build script of your project:

```kotlin
plugins {
id("org.jetbrains.dokka") version "1.9.20"
id("org.jetbrains.dokka") version "2.0.0"
}
```

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

```groovy
plugins {
id 'org.jetbrains.dokka' version '1.9.20'
id 'org.jetbrains.dokka' version '2.0.0'
}
```

Expand Down Expand Up @@ -100,7 +100,7 @@ Add the Dokka Maven plugin to the `plugins` section of your POM file:
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
<version>1.9.20</version>
<version>2.0.0</version>
<executions>
<execution>
<phase>pre-site</phase>
Expand Down Expand Up @@ -139,7 +139,7 @@ which aims to improve documentation experience on the Android platform:

```kotlin
dependencies {
dokkaPlugin("org.jetbrains.dokka:android-documentation-plugin:1.9.20")
dokkaPlugin("org.jetbrains.dokka:android-documentation-plugin:2.0.0")
}
```

Expand All @@ -150,7 +150,7 @@ dependencies {

```groovy
dependencies {
dokkaPlugin 'org.jetbrains.dokka:android-documentation-plugin:1.9.20'
dokkaPlugin 'org.jetbrains.dokka:android-documentation-plugin:2.0.0'
}
```

Expand All @@ -169,7 +169,7 @@ dependencies {
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>android-documentation-plugin</artifactId>
<version>1.9.20</version>
<version>2.0.0</version>
</plugin>
</dokkaPlugins>
</configuration>
Expand Down Expand Up @@ -216,7 +216,7 @@ implement plugins for missing or very specific features that are not provided ou
Learn more about Dokka plugins and their configuration in [Dokka plugins](https://kotlinlang.org/docs/dokka-plugins.html).

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

## Community

Expand Down
4 changes: 2 additions & 2 deletions docs-developer/docs/developer_guide/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ will review API changes thoroughly, so please make sure it's intentional and rat
Having built Dokka locally, you can publish it to `mavenLocal()`. This will allow you to test your changes in another
project as well as debug code remotely.

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

Expand Down
14 changes: 7 additions & 7 deletions docs/topics/dokka-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The Dokka Gradle plugin (DGP) is a tool for generating comprehensive API documen
DGP seamlessly processes both Kotlin's KDoc comments and Java's Javadoc comments to extract information and create
structured documentation in [HTML or Javadoc](#select-documentation-output-format) format.

Starting with Dokka 2.0.0-Beta, you can try the Dokka Gradle plugin v2, the new version of DGP. With Dokka 2.0.0-Beta, you can use
Starting with Dokka 2.0.0, you can try the Dokka Gradle plugin v2, the new version of DGP. With Dokka 2.0.0, you can use
the Dokka Gradle plugin either in v1 or v2 modes.

DGP v2 introduces significant improvements to DGP, aligning more closely with Gradle best practices:
Expand Down Expand Up @@ -38,12 +38,12 @@ Ensure that your project meets the minimum version requirements:

### Enable the new Dokka Gradle plugin

1. Update the Dokka version to 2.0.0-Beta in the `plugins {}` block of your project’s `build.gradle.kts` file:
1. Update the Dokka version to 2.0.0 in the `plugins {}` block of your project’s `build.gradle.kts` file:

```kotlin
plugins {
kotlin("jvm") version "1.9.25"
id("org.jetbrains.dokka") version "2.0.0-Beta"
id("org.jetbrains.dokka") version "2.0.0"
}
```

Expand Down Expand Up @@ -275,7 +275,7 @@ set up the convention plugin, and then apply the plugin to your modules (subproj
}

dependencies {
implementation("org.jetbrains.dokka:dokka-gradle-plugin:2.0.0-Beta")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:2.0.0")
}
```

Expand Down Expand Up @@ -386,10 +386,10 @@ or both formats at the same time:
```kotlin
plugins {
// Generates HTML documentation
id("org.jetbrains.dokka") version "2.0.0-Beta"
id("org.jetbrains.dokka") version "2.0.0"

// Generates Javadoc documentation
id("org.jetbrains.dokka-javadoc") version "2.0.0-Beta"
id("org.jetbrains.dokka-javadoc") version "2.0.0"

// Keeping both plugin IDs generates both formats
}
Expand All @@ -412,7 +412,7 @@ Here's a list of the plugin `id` and Gradle task that correspond to each format:

### Address deprecations and removals

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

Expand Down
4 changes: 2 additions & 2 deletions docs/v.list
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

<vars>
<var name="dokkaVersion"
value="1.9.20"
value="2.0.0"
type="string"/>
<var name="kotlinVersion"
value="1.9.22"
value="2.1.0"
type="string"/>
</vars>
2 changes: 1 addition & 1 deletion dokka-integration-tests/gradle/projects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Projects used to run integration tests could be opened in or build independently

1. open `gradle.properties` file of a specific project and change commented variables:
1. `dokka_it_kotlin_version` to required version of Kotlin Gradle Plugin, e.g 2.0.0
2. `dokka_it_dokka_version` to required version to Dokka Gradle plugin, e.g 1.9.20
2. `dokka_it_dokka_version` to required version to Dokka Gradle plugin, e.g 2.0.0
3. replace all other commented properties if needed, like `dokka_it_android_gradle_plugin_version`
2. open `settings.gradle.kts` and replace `apply(from = "template.settings.gradle.kts")` with
`apply(from = "../template.settings.gradle.kts")` (so the path should be prefixed with `../`)
Expand Down
4 changes: 2 additions & 2 deletions dokka-subprojects/analysis-kotlin-symbols/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To build it with an override version of Analysis API, the property

### Entry point

The main entry point is `DefaultSymbolToDocumentableTranslator` (this is an extension for [the extension point](https://kotlin.github.io/dokka/1.9.20/developer_guide/architecture/extension_points/core_extensions/#sourcetodocumentabletranslator) ), that is used by the Dokka core to build Documentable model by a source set.
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.

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

See the detailed guide [here](https://kotlin.github.io/dokka/1.9.20/developer_guide/workflow/).
See the detailed guide [here](https://kotlin.github.io/dokka/2.0.0/developer_guide/workflow/).
2 changes: 1 addition & 1 deletion dokka-subprojects/plugin-kotlin-as-java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The Kotlin as Java plugin is published to maven central as a
[separate artifact](https://mvnrepository.com/artifact/org.jetbrains.dokka/kotlin-as-java-plugin):

```text
org.jetbrains.dokka:kotlin-as-java-plugin:1.9.20
org.jetbrains.dokka:kotlin-as-java-plugin:2.0.0
```

**This plugin is at its early stages**, so you may experience issues and encounter bugs. Feel free to
Expand Down
2 changes: 1 addition & 1 deletion dokka-subprojects/plugin-mathjax/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ The MathJax plugin is published to Maven Central as a
[separate artifact](https://mvnrepository.com/artifact/org.jetbrains.dokka/mathjax-plugin):

```text
org.jetbrains.dokka:mathjax-plugin:1.9.20
org.jetbrains.dokka:mathjax-plugin:2.0.0
```
26 changes: 13 additions & 13 deletions dokka-subprojects/plugin-versioning/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ You can apply the versioning plugin the same way as other Dokka plugins:

```kotlin
dependencies {
dokkaHtmlPlugin("org.jetbrains.dokka:versioning-plugin:1.9.20")
dokkaHtmlPlugin("org.jetbrains.dokka:versioning-plugin:2.0.0")
}
```

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

```groovy
dependencies {
dokkaHtmlPlugin 'org.jetbrains.dokka:versioning-plugin:1.9.20'
dokkaHtmlPlugin 'org.jetbrains.dokka:versioning-plugin:2.0.0'
}
```

Expand All @@ -55,7 +55,7 @@ plugin within subprojects as well as in their parent project.
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>versioning-plugin</artifactId>
<version>1.9.20</version>
<version>2.0.0</version>
</plugin>
</dokkaPlugins>
</configuration>
Expand All @@ -68,15 +68,15 @@ plugin within subprojects as well as in their parent project.
<summary>CLI</summary>

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

Via command line arguments:

```Bash
java -jar dokka-cli-1.9.20.jar \
-pluginsClasspath "./dokka-base-1.9.20.jar;...;./versioning-plugin-1.9.20.jar" \
java -jar dokka-cli-2.0.0.jar \
-pluginsClasspath "./dokka-base-2.0.0.jar;...;./versioning-plugin-2.0.0.jar" \
...
```

Expand All @@ -86,9 +86,9 @@ Via JSON configuration:
{
...
"pluginsClasspath": [
"./dokka-base-1.9.20.jar",
"./dokka-base-2.0.0.jar",
"...",
"./versioning-plugin-1.9.20.jar"
"./versioning-plugin-2.0.0.jar"
],
...
}
Expand Down Expand Up @@ -136,7 +136,7 @@ import org.jetbrains.dokka.versioning.VersioningConfiguration

buildscript {
dependencies {
classpath("org.jetbrains.dokka:versioning-plugin:1.9.20")
classpath("org.jetbrains.dokka:versioning-plugin:2.0.0")
}
}

Expand Down Expand Up @@ -233,7 +233,7 @@ dokkaHtml {
<summary>CLI</summary>

```Bash
java -jar dokka-cli-1.9.20.jar \
java -jar dokka-cli-2.0.0.jar \
...
-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}"

Expand Down Expand Up @@ -294,12 +294,12 @@ import org.jetbrains.dokka.versioning.VersioningConfiguration

buildscript {
dependencies {
classpath("org.jetbrains.dokka:versioning-plugin:1.9.20")
classpath("org.jetbrains.dokka:versioning-plugin:2.0.0")
}
}

dependencies {
dokkaPlugin("org.jetbrains.dokka:versioning-plugin:1.9.20")
dokkaPlugin("org.jetbrains.dokka:versioning-plugin:2.0.0")
}

tasks.dokkaHtml {
Expand Down
6 changes: 3 additions & 3 deletions examples/gradle/dokka-customFormat-example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.DokkaBaseConfiguration

plugins {
kotlin("jvm") version "1.9.22"
id("org.jetbrains.dokka") version "1.9.20"
kotlin("jvm") version "2.1.0"
id("org.jetbrains.dokka") version "2.0.0"
}

buildscript {
dependencies {
classpath("org.jetbrains.dokka:dokka-base:1.9.20")
classpath("org.jetbrains.dokka:dokka-base:2.0.0")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions examples/gradle/dokka-gradle-example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import org.jetbrains.dokka.gradle.DokkaTask
import java.net.URL

plugins {
kotlin("jvm") version "1.9.22"
id("org.jetbrains.dokka") version "1.9.20"
kotlin("jvm") version "2.1.0"
id("org.jetbrains.dokka") version "2.0.0"
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
10 changes: 5 additions & 5 deletions examples/gradle/dokka-kotlinAsJava-example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*/

plugins {
kotlin("jvm") version "1.9.22"
id("org.jetbrains.dokka") version "1.9.20"
kotlin("jvm") version "2.1.0"
id("org.jetbrains.dokka") version "2.0.0"
}

repositories {
Expand All @@ -15,11 +15,11 @@ dependencies {
testImplementation(kotlin("test-junit"))

// Will apply the plugin to all Dokka tasks
dokkaPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.9.20")
dokkaPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:2.0.0")

// Will apply the plugin only to the `:dokkaHtml` task
//dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.9.20")
//dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:2.0.0")

// Will apply the plugin only to the `:dokkaGfm` task
//dokkaGfmPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.9.20")
//dokkaGfmPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:2.0.0")
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading