File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
build-logic/src/main/kotlin Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 11import java.io.FileInputStream
22import java.util.Properties
3- import org.jetbrains.dokka.Platform
4- import org.jetbrains.dokka.gradle.DokkaTask
3+ import org.jetbrains.dokka.gradle.engine.parameters.KotlinPlatform
4+ import org.jetbrains.dokka.gradle.internal.InternalDokkaGradlePluginApi
5+ import org.jetbrains.dokka.gradle.tasks.DokkaGenerateTask
56import org.jetbrains.kotlin.gradle.dsl.JvmTarget
67
78
@@ -55,19 +56,24 @@ kotlin {
5556
5657
5758// Documentation.
58- val dokkaJvmJavadoc by tasks.creating( DokkaTask :: class ) {
59+ dokka {
5960 dokkaSourceSets {
6061 register(" jvm" ) {
61- platform .set(Platform .jvm )
62+ analysisPlatform .set(KotlinPlatform . JVM )
6263 sourceRoots.from(kotlin.sourceSets.getByName(" jvmMain" ).kotlin.srcDirs)
6364 }
6465 }
6566}
67+ tasks.withType<DokkaGenerateTask >().configureEach {
68+ // HACK: Dokka 2.0.0 exposes this debug file by default (https://github.com/Kotlin/dokka/issues/3958)
69+ @OptIn( InternalDokkaGradlePluginApi ::class )
70+ dokkaConfigurationJsonFile.convention( null as RegularFile ? )
71+ }
6672val javadocJar by tasks.creating(Jar ::class ) {
6773 group = JavaBasePlugin .DOCUMENTATION_GROUP
6874 description = " Create javadoc jar using Dokka"
6975 archiveClassifier.set(" javadoc" )
70- from(dokkaJvmJavadoc )
76+ from(tasks.dokkaGeneratePublicationHtml )
7177}
7278
7379
Original file line number Diff line number Diff line change 11kotlin.mpp.applyDefaultHierarchyTemplate =false
2+ org.jetbrains.dokka.experimental.gradle.pluginMode =V2Enabled
3+ org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn =true
24
35# Prevent out of memory errors.
46org.gradle.jvmargs =-XX:MaxMetaspaceSize=1024m
You can’t perform that action at this time.
0 commit comments