Skip to content

Commit

Permalink
Update versioning readme for Dokka Gradle plugin v2
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdgr8 committed Dec 28, 2024
1 parent fc574c8 commit 0238442
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions dokka-subprojects/plugin-versioning/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,12 @@ buildscript {
}
}

tasks.dokkaHtml {
pluginConfiguration<VersioningPlugin, VersioningConfiguration> {
version = "1.5"
versionsOrdering = listOf("1.5", "1.4", "1.3", "1.2", "1.1", "alpha-2", "alpha-1")
olderVersionsDir = file("documentation/version")
olderVersions = listOf(file("documentation/alpha/alpha-2"), file("documentation/alpha/alpha-1"))
renderVersionsNavigationOnAllPages = true
}
dokka.pluginsConfiguration.versioning {
version = "1.5"
versionsOrdering = listOf("1.5", "1.4", "1.3", "1.2", "1.1", "alpha-2", "alpha-1")
olderVersionsDir = file("documentation/version")
olderVersions = listOf(file("documentation/alpha/alpha-2"), file("documentation/alpha/alpha-1"))
renderVersionsNavigationOnAllPages = true
}
```

Expand All @@ -163,7 +161,7 @@ Alternatively, you can configure it via JSON:
"renderVersionsNavigationOnAllPages": true
}
"""
pluginsMapConfiguration.set(
dokka.pluginsMapConfiguration.set(
mapOf(
"org.jetbrains.dokka.versioning.VersioningPlugin" to versioningConfiguration
)
Expand All @@ -176,7 +174,6 @@ Alternatively, you can configure it via JSON:
<summary>Groovy</summary>

```groovy
dokkaHtml {
String versioningConfiguration = """
{
"version": "1.5",
Expand All @@ -186,10 +183,9 @@ dokkaHtml {
"renderVersionsNavigationOnAllPages": true
}
"""
pluginsMapConfiguration.set(
dokka.pluginsMapConfiguration.set(
["org.jetbrains.dokka.versioning.VersioningPlugin": versioningConfiguration]
)
}
```

</details>
Expand Down Expand Up @@ -302,7 +298,7 @@ dependencies {
dokkaPlugin("org.jetbrains.dokka:versioning-plugin:2.0.0")
}

tasks.dokkaHtml {
tasks.dokkaGeneratePublicationHtml {
// This can be any persistent folder where
// you store documentation by version
val docVersionsDir = projectDir.resolve("documentation/version")
Expand All @@ -315,7 +311,7 @@ tasks.dokkaHtml {
val currentDocsDir = docVersionsDir.resolve(currentVersion)
outputDirectory.set(currentDocsDir)

pluginConfiguration<VersioningPlugin, VersioningConfiguration> {
dokka.pluginsConfiguration.versioning {
olderVersionsDir = docVersionsDir
version = currentVersion
}
Expand Down

0 comments on commit 0238442

Please sign in to comment.