From a1f1789d7b3fc7bc279dbce9779a79c559b37a49 Mon Sep 17 00:00:00 2001 From: sergeych Date: Thu, 15 Oct 2026 08:38:49 +0400 Subject: [PATCH] Migrate API documentation publisher to Dokka 2.2 Use the current publication task and retain the existing output directory and upload destination. Allocate sufficient memory for Kotlin multiplatform API analysis. --- bin/pubdocs | 3 ++- build.gradle.kts | 12 +++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/bin/pubdocs b/bin/pubdocs index 884634f..eda413a 100755 --- a/bin/pubdocs +++ b/bin/pubdocs @@ -10,5 +10,6 @@ # set -e -./gradlew dokkaHtml +# Dokka needs more Metaspace than the default Gradle daemon on this KMP project. +./gradlew '-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=1g' dokkaGeneratePublicationHtml rsync -avz ./build/dokka/* code.sergeych.net:/bigstore/sergeych_pub/code/docs/kiloparsec diff --git a/build.gradle.kts b/build.gradle.kts index 2c6fb79..db274c9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,7 +15,7 @@ plugins { id("org.jetbrains.kotlin.plugin.serialization") version "2.2.21" id("com.android.library") version "8.7.2" apply true `maven-publish` - id("org.jetbrains.dokka") version "1.9.20" + id("org.jetbrains.dokka") version "2.2.0" } group = "net.sergeych" @@ -174,15 +174,13 @@ publishing { } -tasks.dokkaHtml.configure { - outputDirectory.set(buildDir.resolve("dokka")) - dokkaSourceSets { - configureEach { -// includes.from("docs/bipack.md") - } +dokka { + dokkaPublications.html { + outputDirectory.set(layout.buildDirectory.dir("dokka")) } } + android { namespace = "net.sergeych.kiloparsec" compileSdk = 34