refactor(build): Centralize Dokka configuration into convention plugin (#4173)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich
2026-01-09 09:40:00 -06:00
committed by GitHub
parent 02f99bd7bb
commit 731430d7d6
29 changed files with 283 additions and 149 deletions
+1 -111
View File
@@ -45,116 +45,6 @@ plugins {
kover {
reports {
filters {
excludes {
// Exclude generated classes
classes("*_Impl")
classes("*Binding")
classes("*Factory")
classes("*.BuildConfig")
classes("*.R")
classes("*.R$*")
// Exclude UI components
annotatedBy("*Preview")
// Exclude declarations
annotatedBy(
"*.HiltAndroidApp",
"*.AndroidEntryPoint",
"*.Module",
"*.Provides",
"*.Binds",
"*.Composable",
)
// Suppress generated code
packages("hilt_aggregated_deps")
packages("org.meshtastic.core.strings")
}
}
}
}
subprojects {
// Apply Dokka to all subprojects to ensure they are available for aggregation
apply(plugin = "org.jetbrains.dokka")
dokka {
dokkaSourceSets.configureEach {
perPackageOption {
matchingRegex.set("hilt_aggregated_deps")
suppress.set(true)
}
perPackageOption {
matchingRegex.set("org.meshtastic.core.strings.*")
suppress.set(true)
}
listOf("java", "kotlin").forEach { lang ->
val dir = file("src/main/$lang")
if (dir.exists()) {
sourceLink {
enableJdkDocumentationLink.set(true)
enableKotlinStdLibDocumentationLink.set(true)
reportUndocumented.set(true)
localDirectory.set(dir)
val relativePath = project.projectDir.relativeTo(rootProject.projectDir).path.replace("\\", "/")
remoteUrl("https://github.com/meshtastic/Meshtastic-Android/blob/main/$relativePath/src/main/$lang")
remoteLineSuffix.set("#L")
}
}
}
}
}
}
dependencies {
kover(projects.app)
kover(projects.core.analytics)
kover(projects.core.common)
kover(projects.core.data)
kover(projects.core.datastore)
kover(projects.core.model)
kover(projects.core.navigation)
kover(projects.core.network)
kover(projects.core.prefs)
kover(projects.core.ui)
kover(projects.feature.intro)
kover(projects.feature.messaging)
kover(projects.feature.map)
kover(projects.feature.node)
kover(projects.feature.settings)
dokka(project(":app"))
dokka(project(":core:analytics"))
dokka(project(":core:common"))
dokka(project(":core:data"))
dokka(project(":core:database"))
dokka(project(":core:datastore"))
dokka(project(":core:di"))
dokka(project(":core:model"))
dokka(project(":core:navigation"))
dokka(project(":core:network"))
dokka(project(":core:prefs"))
dokka(project(":core:proto"))
dokka(project(":core:service"))
dokka(project(":core:ui"))
dokka(project(":feature:intro"))
dokka(project(":feature:messaging"))
dokka(project(":feature:map"))
dokka(project(":feature:node"))
dokka(project(":feature:settings"))
dokkaPlugin(libs.dokka.android.documentation.plugin)
}
dokka {
moduleName.set("Meshtastic App")
dokkaPublications.html {
suppressInheritedMembers.set(true)
}
}