Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API documentation generated with Dokka to the site deployed to GitHub Pages #43

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
7 changes: 7 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ tasks.wrapper {

plugins {
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.16.3"
id("org.jetbrains.dokka")
}

apiValidation {
Expand All @@ -16,3 +17,9 @@ apiValidation {
listOf("$it-demo", "$it-common-legacy")
}
}

dependencies {
subprojects.filter { it.name.startsWith(project.name) }.forEach {
dokka(it)
}
}
12 changes: 12 additions & 0 deletions buildSrc/src/main/kotlin/dokka-convention.gradle.kts
Original file line number Diff line number Diff line change
@@ -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()
}
*/
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/lib-conventions.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
plugins {
id("lib-conventions-without-publishing")
id("dokka-convention")
id("com.huanshankeji.kotlin-multiplatform-sonatype-ossrh-publish-conventions")
}
6 changes: 4 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Loading