diff --git a/build-logic/src/main/kotlin/ktlint-dokka.gradle.kts b/build-logic/src/main/kotlin/ktlint-dokka.gradle.kts index 46c0d70b3a..c980f2ba52 100644 --- a/build-logic/src/main/kotlin/ktlint-dokka.gradle.kts +++ b/build-logic/src/main/kotlin/ktlint-dokka.gradle.kts @@ -1,20 +1,16 @@ plugins { `java-library` - id("org.jetbrains.dokka") + // Generates Javadoc documentation + id("org.jetbrains.dokka-javadoc") +} + +dokka { + dokkaPublications.javadoc { + outputDirectory.set(layout.buildDirectory.dir("javadoc")) + } } java { withSourcesJar() withJavadocJar() } - -tasks.dokkaJavadoc { - notCompatibleWithConfigurationCache("https://github.com/Kotlin/dokka/issues/1217") - outputDirectory = layout.buildDirectory.dir("javadoc") -} - -tasks.named("javadocJar") { - dependsOn(tasks.dokkaJavadoc) - archiveClassifier = "javadoc" - from(tasks.dokkaJavadoc) -} diff --git a/gradle.properties b/gradle.properties index ff57418420..f18af48f8a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,3 +23,6 @@ org.gradle.caching=true # The release process of ktlint breaks whenever the configuration cache is enabled as not all gradle tasks fully supports this feature yet. # As the configuration cache only slightly improves the build performance, it is kept disabled for now. org.gradle.configuration-cache=false + +# Enable helpers for migration to Dokka V2 +org.jetbrains.dokka.experimental.gradle.pluginMode=V2EnabledWithHelpers