Skip to content

Commit

Permalink
Update documentation and examples to Dokka 1.7.0 (#2542)
Browse files Browse the repository at this point in the history
(cherry picked from commit fc86d21)
  • Loading branch information
IgnatBeresnev committed Jun 20, 2022
1 parent 5e770ef commit abd963b
Show file tree
Hide file tree
Showing 28 changed files with 62 additions and 62 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ Here's how to import and configure Dokka in IntelliJ IDEA:

If you want to use/test your locally built Dokka in a project, do the following:
1. Change `dokka_version` in `gradle.properties` to something that you will use later on as the dependency version.
For instance, you can set it to something like `1.6.21-my-fix-SNAPSHOT`.
For instance, you can set it to something like `1.7.0-my-fix-SNAPSHOT`.
2. Publish it to maven local (`./gradlew publishToMavenLocal`)
3. In the project you want to generate documentation for, add maven local as a plugin/dependency
repository (`mavenLocal()`)
4. Update your dokka dependency to the version you've just published:
```kotlin
plugins {
id("org.jetbrains.dokka") version "1.6.21-my-fix-SNAPSHOT"
id("org.jetbrains.dokka") version "1.7.0-my-fix-SNAPSHOT"
}
```
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ and can generate documentation in multiple formats including standard Javadoc, H

## Using Dokka

**Full documentation is available at [https://kotlin.github.io/dokka/1.6.21/](https://kotlin.github.io/dokka/1.6.21/)**
**Full documentation is available at [https://kotlin.github.io/dokka/1.7.0/](https://kotlin.github.io/dokka/1.7.0/)**

### Using the Gradle plugin
_Note: If you are upgrading from 0.10.x to a current release of Dokka, please have a look at our
Expand All @@ -22,7 +22,7 @@ The preferred way is to use `plugins` block.
build.gradle.kts:
```kotlin
plugins {
id("org.jetbrains.dokka") version "1.6.21"
id("org.jetbrains.dokka") version "1.7.0"
}

repositories {
Expand All @@ -37,7 +37,7 @@ Dokka plugin creates Gradle configuration for each output format in the form of

```kotlin
dependencies {
dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.6.21")
dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.7.0")
}
```

Expand All @@ -46,7 +46,7 @@ You can also create a custom Dokka task and add plugins directly inside:
```kotlin
val customDokkaTask by creating(DokkaTask::class) {
dependencies {
plugins("org.jetbrains.dokka:kotlin-as-java-plugin:1.6.21")
plugins("org.jetbrains.dokka:kotlin-as-java-plugin:1.7.0")
}
}
```
Expand Down
8 changes: 4 additions & 4 deletions docs/src/doc/docs/community/plugins-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ In order to add your plugin to this list it needs to be:

| Plugin name | Description | Source |
| :--------- | :--------- | :------------ |
| [Kotlin as Java](https://kotlin.github.io/dokka/1.6.21/user_guide/introduction/#plugins) | Display Kotlin code as seen from Java | [Github](https://github.com/Kotlin/dokka/tree/master/plugins/kotlin-as-java)
| [GFM](https://kotlin.github.io/dokka/1.6.21/user_guide/introduction/#plugins) | Renders documentation in a GFM format | [Github](https://github.com/Kotlin/dokka/tree/master/plugins/gfm)
| [Javadoc](https://kotlin.github.io/dokka/1.6.21/user_guide/introduction/#plugins) | Renders documentation in a Javadoc format | [Github](https://github.com/Kotlin/dokka/tree/master/plugins/javadoc)
| [Jekyll](https://kotlin.github.io/dokka/1.6.21/user_guide/introduction/#plugins) | Renders documentation in a Jekyll format | [Github](https://github.com/Kotlin/dokka/tree/master/plugins/jekyll)
| [Kotlin as Java](https://kotlin.github.io/dokka/1.7.0/user_guide/introduction/#plugins) | Display Kotlin code as seen from Java | [Github](https://github.com/Kotlin/dokka/tree/master/plugins/kotlin-as-java)
| [GFM](https://kotlin.github.io/dokka/1.7.0/user_guide/introduction/#plugins) | Renders documentation in a GFM format | [Github](https://github.com/Kotlin/dokka/tree/master/plugins/gfm)
| [Javadoc](https://kotlin.github.io/dokka/1.7.0/user_guide/introduction/#plugins) | Renders documentation in a Javadoc format | [Github](https://github.com/Kotlin/dokka/tree/master/plugins/javadoc)
| [Jekyll](https://kotlin.github.io/dokka/1.7.0/user_guide/introduction/#plugins) | Renders documentation in a Jekyll format | [Github](https://github.com/Kotlin/dokka/tree/master/plugins/jekyll)
| [Mermaid-HTML](https://mermaid-js.github.io/mermaid/#/) | Renders Mermaid graphs for HTML renderer. | [Github](https://github.com/glureau/dokka-mermaid)


4 changes: 2 additions & 2 deletions docs/src/doc/docs/user_guide/base-specific/frontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ Variables given below are available to the template:
Also, Dokka-defined [directives](https://freemarker.apache.org/docs/ref_directive_userDefined.html) can be used:
* `<@content/>` - main content
* `<@resources/>` - scripts, stylesheets
* `<@version/>` - version ([versioning-plugin](https://kotlin.github.io/dokka/1.6.21/user_guide/versioning/versioning/) will replace this with a version navigator)
* `<@version/>` - version ([versioning-plugin](https://kotlin.github.io/dokka/1.7.0/user_guide/versioning/versioning/) will replace this with a version navigator)
* `<@template_cmd name="...""> ...</@template_cmd>` - is used for variables that depend on the root project (such `pathToRoot`, `projectName`). They are available only inside the directive. This is processed by a multi-module task that assembles partial outputs from modules.
Example:
```
<@template_cmd name="projectName">
<span>${projectName}</span>
</@template_cmd>
```
```
14 changes: 7 additions & 7 deletions docs/src/doc/docs/user_guide/cli/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ The content of JSON file ```dokkaConfiguration.json```:
"sourceSetName": "main"
},
"classpath": [
"libs/kotlin-stdlib-1.6.21.jar",
"libs/kotlin-stdlib-common-1.6.21.jar"
"libs/kotlin-stdlib-1.7.0.jar",
"libs/kotlin-stdlib-common-1.7.0.jar"
],
"sourceRoots": [
"/home/Vadim.Mishenev/dokka/examples/cli/src/main/kotlin"
Expand Down Expand Up @@ -135,11 +135,11 @@ The content of JSON file ```dokkaConfiguration.json```:
}
],
"pluginsClasspath": [
"plugins/dokka-base-1.6.21.jar",
"plugins/dokka-base-1.7.0.jar",
"libs/kotlinx-html-jvm-0.7.3.jar",
"libs/dokka-analysis-1.6.21.jar",
"libs/kotlin-analysis-intellij-1.6.21.jar",
"libs/kotlin-analysis-compiler-1.6.21.jar"
"libs/dokka-analysis-1.7.0.jar",
"libs/kotlin-analysis-intellij-1.7.0.jar",
"libs/kotlin-analysis-compiler-1.7.0.jar"
],
"pluginsConfiguration": [
{
Expand All @@ -155,4 +155,4 @@ The content of JSON file ```dokkaConfiguration.json```:
"includes": [],
"suppressInheritedMembers": false
}
```
```
8 changes: 4 additions & 4 deletions docs/src/doc/docs/user_guide/gradle/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The preferred way is to use `plugins` block.
build.gradle.kts:
```kotlin
plugins {
id("org.jetbrains.dokka") version "1.6.21"
id("org.jetbrains.dokka") version "1.7.0"
}

repositories {
Expand Down Expand Up @@ -269,7 +269,7 @@ Dokka plugin creates Gradle configuration for each output format in the form of

```kotlin
dependencies {
dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.6.21")
dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.7.0")
}
```

Expand All @@ -278,7 +278,7 @@ You can also create a custom Dokka task and add plugins directly inside:
```kotlin
val customDokkaTask by creating(DokkaTask::class) {
dependencies {
plugins("org.jetbrains.dokka:kotlin-as-java-plugin:1.6.21")
plugins("org.jetbrains.dokka:kotlin-as-java-plugin:1.7.0")
}
}
```
Expand Down Expand Up @@ -311,7 +311,7 @@ For example, you can add `DokkaBase` to gain access to aforementioned configurat
buildscript {
dependencies {
// classpath("<plugin coordinates>:<plugin version>")
classpath("org.jetbrains.dokka:dokka-base:1.6.21")
classpath("org.jetbrains.dokka:dokka-base:1.7.0")
}
}
```
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
@@ -1,13 +1,13 @@
import org.jetbrains.dokka.gradle.DokkaTask

plugins {
kotlin("jvm") version "1.6.21"
id("org.jetbrains.dokka") version ("1.6.21")
kotlin("jvm") version "1.7.0"
id("org.jetbrains.dokka") version ("1.7.0")
}

buildscript {
dependencies {
classpath("org.jetbrains.dokka:dokka-base:1.6.21")
classpath("org.jetbrains.dokka:dokka-base:1.7.0")
}
}

Expand Down
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 @@ -2,8 +2,8 @@ import org.jetbrains.dokka.gradle.DokkaTask
import java.net.URL

plugins {
kotlin("jvm") version "1.6.21"
id("org.jetbrains.dokka") version ("1.6.21")
kotlin("jvm") version "1.7.0"
id("org.jetbrains.dokka") version ("1.7.0")
}

repositories {
Expand Down
10 changes: 5 additions & 5 deletions examples/gradle/dokka-kotlinAsJava-example/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
kotlin("jvm") version "1.6.21"
id("org.jetbrains.dokka") version ("1.6.21")
kotlin("jvm") version "1.7.0"
id("org.jetbrains.dokka") version ("1.7.0")
}

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

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

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

// Will apply the plugin only to the `:dokkaGfm` task
//dokkaGfmPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.6.21")
//dokkaGfmPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.7.0")
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
kotlin("jvm") version "1.6.21"
id("org.jetbrains.dokka") version ("1.6.21")
kotlin("jvm") version "1.7.0"
id("org.jetbrains.dokka") version ("1.7.0")
`java-library`
`maven-publish`
}
Expand Down
4 changes: 2 additions & 2 deletions examples/gradle/dokka-multimodule-example/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pluginManagement {
plugins {
kotlin("jvm") version "1.6.21"
id("org.jetbrains.dokka") version ("1.6.21")
kotlin("jvm") version "1.7.0"
id("org.jetbrains.dokka") version ("1.7.0")
}
}

Expand Down
4 changes: 2 additions & 2 deletions examples/gradle/dokka-multiplatform-example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.dokka.Platform

plugins {
kotlin("multiplatform") version "1.6.21"
id("org.jetbrains.dokka") version "1.6.21"
kotlin("multiplatform") version "1.7.0"
id("org.jetbrains.dokka") version "1.7.0"
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
kotlin("jvm") version "1.6.21"
id("org.jetbrains.dokka") version ("1.6.21") apply false
kotlin("jvm") version "1.7.0"
id("org.jetbrains.dokka") version ("1.7.0") apply false
}

// The versioning plugin should be applied in all submodules
Expand All @@ -14,6 +14,6 @@ subprojects {
}
val dokkaPlugin by configurations
dependencies {
dokkaPlugin("org.jetbrains.dokka:versioning-plugin:1.6.21")
dokkaPlugin("org.jetbrains.dokka:versioning-plugin:1.7.0")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ val olderVersionsFolder = "olderVersions"
// The previously documentations should be generated with the versioning plugin
val generatePreviouslyDocTask by tasks.register<DokkaMultiModuleTask>("dokkaPreviouslyDocumentation") {
dependencies {
dokkaPlugin("org.jetbrains.dokka:all-modules-page-plugin:1.6.21")
dokkaPlugin("org.jetbrains.dokka:versioning-plugin:1.6.21")
dokkaPlugin("org.jetbrains.dokka:all-modules-page-plugin:1.7.0")
dokkaPlugin("org.jetbrains.dokka:versioning-plugin:1.7.0")
}
val configuredVersion = "0.9"
outputDirectory.set(file(projectDir.toPath().resolve(olderVersionsFolder).resolve(configuredVersion)))
Expand All @@ -22,4 +22,4 @@ tasks.dokkaHtmlMultiModule {
dependsOn(generatePreviouslyDocTask)
val configuredVersion = "1.0"
pluginsMapConfiguration.set(mapOf("org.jetbrains.dokka.versioning.VersioningPlugin" to """{ "version": "$configuredVersion", "olderVersionsDir": "$projectDir/$olderVersionsFolder" }"""))
}
}
4 changes: 2 additions & 2 deletions examples/maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<artifactId>kotlin-maven-example</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<kotlin.version>1.6.21</kotlin.version>
<dokka.version>1.6.21</dokka.version>
<kotlin.version>1.7.0</kotlin.version>
<dokka.version>1.7.0</dokka.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dokka_it_kotlin_version=1.6.21
dokka_it_kotlin_version=1.7.0
dokka_it_android_gradle_plugin_version=4.0.0
android.useAndroidX=true
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dokka_it_kotlin_version=1.6.21
dokka_it_kotlin_version=1.7.0
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildscript {
}
}

version = "1.6.21-SNAPSHOT"
version = "1.7.0-SNAPSHOT"

apply(from = "../template.root.gradle.kts")

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dokka_it_kotlin_version=1.6.21
dokka_it_kotlin_version=1.7.0
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dokka_it_kotlin_version=1.6.21
dokka_it_kotlin_version=1.7.0
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dokka_it_kotlin_version=1.6.21
react_version=18.0.0-pre.332-kotlin-1.6.21
dokka_it_kotlin_version=1.7.0
react_version=18.1.0-pre.345
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dokka_it_kotlin_version=1.6.21
dokka_it_kotlin_version=1.7.0
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dokka_it_kotlin_version=1.6.21
dokka_it_kotlin_version=1.7.0
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dokka_it_kotlin_version=1.6.21
dokka_it_kotlin_version=1.7.0

Original file line number Diff line number Diff line change
@@ -1 +1 @@
dokka_it_kotlin_version=1.6.21
dokka_it_kotlin_version=1.7.0
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class BasicGradleIntegrationTest(override val versions: BuildVersions) : Abstrac
val indexFile = File(this, "index.html")
assertTrue(indexFile.isFile, "Missing index.html")
assertTrue(
"""<title>Basic Project 1.6.21-SNAPSHOT API </title>""" in indexFile.readText(),
"""<title>Basic Project 1.7.0-SNAPSHOT API </title>""" in indexFile.readText(),
"Header with version number not present in index.html"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ internal object TestedVersions {
val ANDROID =
BuildVersions.permutations(
gradleVersions = listOf("7.4.2", *ifExhaustive("7.0")),
kotlinVersions = listOf("1.6.21", "1.5.31", "1.4.32"),
kotlinVersions = listOf("1.7.0", "1.6.21", "1.5.31", "1.4.32"),
androidGradlePluginVersions = listOf("7.2.0")
) + BuildVersions.permutations(
gradleVersions = listOf("6.9", *ifExhaustive("6.1.1", "5.6.4")),
kotlinVersions = listOf("1.6.21", "1.5.31", "1.4.32"),
kotlinVersions = listOf("1.7.0", "1.6.21", "1.5.31", "1.4.32"),
androidGradlePluginVersions = listOf("4.0.0", *ifExhaustive("3.6.3"))
)

Expand Down
2 changes: 1 addition & 1 deletion integration-tests/maven/projects/it-maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<version>1.0-SNAPSHOT</version>

<properties>
<kotlin.version>1.6.21</kotlin.version>
<kotlin.version>1.7.0</kotlin.version>
</properties>
<build>
<plugins>
Expand Down

0 comments on commit abd963b

Please sign in to comment.