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 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
tasks.wrapper {
distributionType = Wrapper.DistributionType.ALL
}

plugins {
id("org.jetbrains.dokka")
}

dependencies {
subprojects.filter { it.name.startsWith(project.name) }.forEach {
dokka(it)
}
}
5 changes: 3 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

repositories {
//mavenLocal() // comment out when not needed
mavenLocal()
gradlePluginPortal()
google()
mavenCentral()
Expand All @@ -15,7 +15,8 @@ dependencies {
implementation(kotlin("gradle-plugin", kotlinVersion))
implementation("org.jetbrains.kotlin:compose-compiler-gradle-plugin:$kotlinVersion")
implementation("org.jetbrains.compose:compose-gradle-plugin:1.7.0")
implementation("com.huanshankeji.team:gradle-plugins:0.6.0") // don't use a snapshot version in a main branch
implementation("com.huanshankeji.team:gradle-plugins:0.7.0-SNAPSHOT") // TODO don't use a snapshot version in a main branch
implementation("com.android.tools.build:gradle:8.5.2")
implementation("com.huanshankeji:common-gradle-dependencies:0.8.0-20241016") // don't use a snapshot version in a main branch
implementation("org.jetbrains.dokka:dokka-gradle-plugin:2.0.0-Beta")
}
8 changes: 8 additions & 0 deletions buildSrc/src/main/kotlin/dokka-convention.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
plugins {
id("com.huanshankeji.team.dokka.github-dokka-convention")
}

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 `androidxCommon` custom source sets
#kotlin.mpp.applyDefaultHierarchyTemplate=false
# For Android
android.useAndroidX=true
# for Dokka
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
Loading