Skip to content

Commit 1d0cdc6

Browse files
authored
Add version to API ref (#314)
1 parent 8ae7be9 commit 1d0cdc6

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

build.gradle.kts

+10
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,13 @@ plugins {
2525
alias(libs.plugins.kotlin.serialization) apply false
2626
alias(libs.plugins.dokka) apply false
2727
}
28+
29+
buildscript {
30+
dependencies {
31+
// there doesn't appear to be a better way to provide this to subprojects.
32+
// this is what lets us put the version number dropdown list in the generated dokka.
33+
// it is a "dokka plugin" which is not a gradle plugin, it needs to be on the classpath
34+
// before any dependent subproject uses its symbols to configure a dokka task.
35+
classpath(libs.dokka.versioning)
36+
}
37+
}

gradle/libs.versions.toml

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ kotlinx-serialization-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-
4040
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
4141
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinxCoroutinesTest" }
4242
truth = { group = "com.google.truth", name = "truth", version.ref = "truth" }
43+
dokka-versioning = { group = "org.jetbrains.dokka", name = "versioning-plugin", version.ref = "dokka" }
4344

4445
[plugins]
4546
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }

kdoc/build.gradle.kts

+6
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ tasks {
5454
//./gradlew :documentation:dokkaHtml
5555
// doc output will be under `documentation/build/dokka/html`.
5656
dokkaHtml {
57+
pluginConfiguration<org.jetbrains.dokka.versioning.VersioningPlugin, org.jetbrains.dokka.versioning.VersioningConfiguration> {
58+
version = versionNumber
59+
}
5760
moduleName.set("arcgis-maps-kotlin-toolkit")
5861
dokkaSourceSets {
5962
configureEach {
@@ -93,6 +96,9 @@ android {
9396
}
9497

9598
dependencies {
99+
// Puts the version in the KDoc
100+
dokkaPlugin(libs.dokka.versioning)
101+
96102
project.afterEvaluate {
97103
releasedModules.forEach { proj ->
98104
proj.configurations.forEach { config ->

0 commit comments

Comments
 (0)