From b3e75dacb76fabd0deebc1925206d1e8cff60c22 Mon Sep 17 00:00:00 2001 From: Mervyn McCreight Date: Sat, 25 Jan 2025 15:51:45 +0100 Subject: [PATCH] build: use v2 of the official dokka gradle plugin The official (but yet experimental) v2 of the dokka gradle plugin has integrated the benefits of the community maintained dokkatoo plugin. --- buildSrc/build.gradle.kts | 2 +- .../src/main/kotlin/library-conventions.gradle.kts | 14 ++++++-------- gradle.properties | 2 ++ gradle/libs.versions.toml | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 9d8ca47c..78ad0267 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -10,6 +10,6 @@ plugins { dependencies { implementation(libs.kotlin.gradle) - implementation(libs.dokkatoo.gradle) + implementation(libs.dokka.gradle) implementation(libs.mavenPublish.gradle) } diff --git a/buildSrc/src/main/kotlin/library-conventions.gradle.kts b/buildSrc/src/main/kotlin/library-conventions.gradle.kts index 3fe73186..2ea58811 100644 --- a/buildSrc/src/main/kotlin/library-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/library-conventions.gradle.kts @@ -5,7 +5,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinVersion plugins { id("kotlin-conventions") - id("dev.adamko.dokkatoo-html") + id("org.jetbrains.dokka") id("com.vanniktech.maven.publish") } @@ -20,16 +20,14 @@ kotlin { } } -dokkatoo { - dokkaGeneratorIsolation.set( - ProcessIsolation { - maxHeapSize.set("4g") - } - ) +dokka { + dokkaGeneratorIsolation = ProcessIsolation { + maxHeapSize = "4g" + } } mavenPublishing { - configure(KotlinJvm(JavadocJar.Dokka("dokkatooGeneratePublicationHtml"))) + // configure(KotlinJvm(JavadocJar.Dokka("dokkaGeneratePublicationHtml"))) publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) signAllPublications() pom { diff --git a/gradle.properties b/gradle.properties index 4f996f1a..68dd01e2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,4 @@ org.gradle.parallel=true org.gradle.caching=true +org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled +org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 98b77eea..6248ceba 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,7 +11,7 @@ serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref [libraries] kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } -dokkatoo-gradle = { module = "dev.adamko.dokkatoo:dokkatoo-plugin", version = "2.4.0" } +dokka-gradle = { module = "org.jetbrains.dokka:org.jetbrains.dokka.gradle.plugin", version = "2.0.0" } mavenPublish-gradle = { module = "com.vanniktech.maven.publish:com.vanniktech.maven.publish.gradle.plugin", version = "0.30.0" } kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" } kotlinx-coroutines-jdk8 = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8", version.ref = "kotlinx-coroutines" }