diff --git a/build.gradle.kts b/build.gradle.kts index bbd5629..8801b7c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,6 +4,7 @@ tasks.wrapper { plugins { id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.16.3" + id("org.jetbrains.dokka") } apiValidation { @@ -16,3 +17,9 @@ apiValidation { listOf("$it-demo", "$it-common-legacy") } } + +dependencies { + subprojects.filter { it.name.startsWith(project.name) }.forEach { + dokka(it) + } +} diff --git a/buildSrc/src/main/kotlin/dokka-convention.gradle.kts b/buildSrc/src/main/kotlin/dokka-convention.gradle.kts new file mode 100644 index 0000000..e2d3a8e --- /dev/null +++ b/buildSrc/src/main/kotlin/dokka-convention.gradle.kts @@ -0,0 +1,12 @@ +plugins { + id("com.huanshankeji.team.dokka.github-dokka-convention") +} + +// TODO use or remove +// This does not resolve since commit bc5afe61d2dba3a8cef51d66ea60feeeb3e83093. +/* +dokka { + // https://github.com/Kotlin/dokka/issues/3885#issuecomment-2449645480 + dokkaGeneratorIsolation = ClassLoaderIsolation() +} +*/ diff --git a/buildSrc/src/main/kotlin/lib-conventions.gradle.kts b/buildSrc/src/main/kotlin/lib-conventions.gradle.kts index e96eb9e..4f188d0 100644 --- a/buildSrc/src/main/kotlin/lib-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/lib-conventions.gradle.kts @@ -1,4 +1,5 @@ plugins { id("lib-conventions-without-publishing") + id("dokka-convention") id("com.huanshankeji.kotlin-multiplatform-sonatype-ossrh-publish-conventions") } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 6f0060c..1330a47 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,9 @@ # For Wasm -# More memory is needed now to compile the Wasm target in Gradle -org.gradle.jvmargs=-Xmx2G +# 2 GB for compiling the Wasm target and 16 GB for Dokka +org.gradle.jvmargs=-Xmx32G # For the `composeUi` custom source sets #kotlin.mpp.applyDefaultHierarchyTemplate=false # For Android android.useAndroidX=true +# for Dokka +org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled