From 50203dc7f565e093f4ca33512d10d8137a91177e Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Sun, 15 Feb 2026 07:38:36 -0600 Subject: [PATCH] chore(docs): Refine Dokka source set configuration (#4562) Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com> --- .../kotlin/org/meshtastic/buildlogic/Dokka.kt | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/build-logic/convention/src/main/kotlin/org/meshtastic/buildlogic/Dokka.kt b/build-logic/convention/src/main/kotlin/org/meshtastic/buildlogic/Dokka.kt index 70e952eab..be41ad5d4 100644 --- a/build-logic/convention/src/main/kotlin/org/meshtastic/buildlogic/Dokka.kt +++ b/build-logic/convention/src/main/kotlin/org/meshtastic/buildlogic/Dokka.kt @@ -37,11 +37,18 @@ fun Project.configureDokka() { suppress.set(true) } - // Ensure source sets containing core logic are not suppressed - val isCoreSourceSet = name in listOf("main", "commonMain", "androidMain", "fdroid", "google") - if (isCoreSourceSet) { - suppress.set(false) - } + // Dokka 2.x requires each source file to belong to exactly one source set. + val baseSourceSets = listOf( + "main", + "commonMain", + "androidMain", + "fdroid", + "google", + "release" + ) + + val isCoreSourceSet = name in baseSourceSets + suppress.set(!isCoreSourceSet) sourceLink { enableJdkDocumentationLink.set(true) @@ -50,7 +57,8 @@ fun Project.configureDokka() { // Standardized repo-root based source links localDirectory.set(project.projectDir) - val relativePath = project.projectDir.relativeTo(rootProject.projectDir).path.replace("\\", "/") + val relativePath = + project.projectDir.relativeTo(rootProject.projectDir).path.replace("\\", "/") remoteUrl.set(URI("https://github.com/meshtastic/Meshtastic-Android/blob/main/$relativePath")) remoteLineSuffix.set("#L") }