blob: 8387d9c8983b22f5fc3a98d12c28af59d8769a3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
import org.jetbrains.dokka.versioning.VersioningPlugin
import org.jetbrains.dokka.versioning.VersioningConfiguration
buildscript {
dependencies {
classpath("org.jetbrains.dokka:versioning-plugin:1.7.20")
}
repositories {
mavenCentral()
}
}
dependencies {
implementation(kotlin("stdlib"))
}
val currentVersion = "1.0"
val previousVersionsDirectory = project.rootProject.projectDir.resolve("previousDocVersions").invariantSeparatorsPath
// Main configuration for the versioning plugin. It will generate documentation for
// the current version of the application, and look for previous versions of docs
// in the directory defined in previousVersionsDirectory, allowing it to create
// the version navigation dropdown menu.
tasks.dokkaHtmlMultiModule {
pluginConfiguration<VersioningPlugin, VersioningConfiguration> {
version = currentVersion
olderVersionsDir = file(previousVersionsDirectory)
}
}
|