feat(docs): migrate configs to dokka 2 (#3031)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich
2025-09-08 22:14:16 -05:00
committed by GitHub
parent 46282c3aec
commit 97eb579d3e
4 changed files with 25 additions and 3 deletions

View File

@@ -43,7 +43,7 @@ jobs:
uses: gradle/actions/setup-gradle@v4
- name: Build Dokka HTML documentation
run: ./gradlew :app:dokkaHtml
run: ./gradlew :app:dokkaGeneratePublicationHtml
- name: Upload artifact
uses: actions/upload-pages-artifact@v4

View File

@@ -16,6 +16,7 @@
*/
import io.gitlab.arturbosch.detekt.Detekt
import org.gradle.kotlin.dsl.invoke
import java.io.FileInputStream
import java.util.Properties
@@ -290,6 +291,7 @@ dependencies {
androidTestImplementation(libs.bundles.testing.room)
detektPlugins(libs.detekt.formatting)
dokkaPlugin(libs.dokka.android.documentation.plugin)
}
ksp {
@@ -352,7 +354,22 @@ spotless {
}
}
tasks.withType<org.jetbrains.dokka.gradle.DokkaTask>().configureEach {
dokka {
moduleName.set("Meshtastic App")
outputDirectory.set(file("build/dokka"))
dokkaSourceSets.main {
sourceLink {
enableJdkDocumentationLink.set(true)
enableKotlinStdLibDocumentationLink.set(true)
enableJdkDocumentationLink.set(true)
reportUndocumented.set(true)
localDirectory.set(file("src/main/java"))
remoteUrl("https://github.com/geeksville/Meshtastic-Android/app/src/main/java")
remoteLineSuffix.set("#L")
}
}
dokkaPublications.html { suppressInheritedMembers.set(true) }
dokkaGeneratorIsolation = ProcessIsolation {
// Configures heap size
maxHeapSize = "6g"
}
}

View File

@@ -54,3 +54,6 @@ kotlin.code.style=official
# https://developer.android.com/build/releases/gradle-plugin#default-changes
android.nonTransitiveRClass=false
android.nonFinalResIds=false
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true

View File

@@ -4,6 +4,7 @@ accompanistPermissions = "0.37.3"
adaptive = "1.2.0-beta01"
adaptive-navigation-suite = "1.3.2"
agp = "8.13.0"
androidDocumentationPlugin = "2.0.0"
appcompat = "1.7.1"
awesome-app-rating = "2.8.0"
coil = "3.3.0"
@@ -98,6 +99,7 @@ dd-sdk-android-timber = { group = "com.datadoghq", name = "dd-sdk-android-timber
dd-sdk-android-trace = { group = "com.datadoghq", name = "dd-sdk-android-trace", version.ref = "dd-sdk-android" }
dd-sdk-android-trace-otel = { group = "com.datadoghq", name = "dd-sdk-android-trace-otel", version.ref = "dd-sdk-android" }
detekt-formatting = { group = "io.gitlab.arturbosch.detekt", name = "detekt-formatting", version.ref = "detekt" }
dokka-android-documentation-plugin = { module = "org.jetbrains.dokka:android-documentation-plugin", version.ref = "androidDocumentationPlugin" }
emoji2-emojipicker = { group = "androidx.emoji2", name = "emoji2-emojipicker", version.ref = "emoji2" }
espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso-core" }
ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junit-version" }