kevin.cianfarini
01/05/2025, 12:04 AMkevin.cianfarini
01/15/2025, 5:16 PMOleg Yukhnevich
01/16/2025, 12:59 PMplugins {
kotlin("multiplatform") version "2.1.0"
id("org.jetbrains.dokka") version "2.0.0"
}
kotlin {
jvm()
}
dependencies {
dokkaHtmlPlugin("org.jetbrains.dokka:versioning-plugin")
}
dokka {
pluginsConfiguration {
versioning {
version = "2.0"
olderVersionsDir = layout.projectDirectory.dir("previousDocVersions")
}
}
}
running dokkaGenerate
will work fine at my side, and when old version will be in previousDocVersions/1.0
- it also works fine
May be you do have some specific issue in mind?kevin.cianfarini
01/17/2025, 1:52 AMolderVersionsDir
over time. Is that correct?Oleg Yukhnevich
01/17/2025, 10:53 AMDo you have any idea how to support generating versioned documentation with a build setup that commits the generated documentation to a separate branch?Hm, I think that during building docs for next version you can on CI: 1. checkout release branch as always 2. checkout
site
branch in some predefined folder (or you can just download zip of that branch via GitHub API)
3. point Dokka olderVersionsDir
to that folder
It seems that all of the previous documentation must be present when using the versioning plugin, and you can incrementally add to theyeah, that's trueover time. Is that correct?olderVersionsDir
kevin.cianfarini
01/17/2025, 12:36 PMHm, I think that during building docs for next version you can on CI:
1. checkout release branch as always
2. checkoutbranch in some predefined folder (or you can just download zip of that branch via GitHub API)site
3. point DokkaYeah I also came to this conclusion. I’ll give it a try. Thanks again for your help.to that folderolderVersionsDir
kevin.cianfarini
01/17/2025, 12:38 PMOleg Yukhnevich
01/17/2025, 2:44 PMolder
directory)kevin.cianfarini
01/17/2025, 3:01 PMIn fact, after you’ve built documentation with Dokka, it will include all previous versions of documentation inside it (inHm, I tried this last night by bumping a local version fromdirectory)older
x.y.z-SNAPSHOT
to x.y.z
and I didn’t see dokka automatically reorganize the documentation. Perhaps I was looking in the wrong place?
I think my question still stands though. Will I cause any problems is the current version documentation parent dir and the older versions parent dir are the same?Oleg Yukhnevich
01/17/2025, 3:10 PMPerhaps I was looking in the wrong place?probably i've confused you 🙂 I mean, when you use versioning plugin, documentation for old versions (f.e coming from
olderVersionsDir
) will be embedded inside documentation for new version in it's older
directory
Will I cause any problems is the current version documentation parent dir and the older versions parent dir are the same?There should be no problems. ktor is also doing the same
kevin.cianfarini
01/17/2025, 3:11 PM