Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class PublishingConventionPlugin : Plugin<Project> {

applyPlugins()
configureKover()
configureDokka()
configureVanniktechPublishing()
}
}
Expand All @@ -35,6 +36,14 @@ class PublishingConventionPlugin : Plugin<Project> {
}
}

private fun Project.configureDokka() {
extensions.configure<org.jetbrains.dokka.gradle.DokkaExtension> {
dokkaSourceSets.configureEach {
suppress.set(name != "androidJvm")
}
}
}

private fun Project.configureVanniktechPublishing() {
extensions.configure<MavenPublishBaseExtension> {
configure(
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ plugins {
alias(libs.plugins.hilt.android) apply false
alias(libs.plugins.secrets.gradle.plugin) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.ksp)
id("org.jetbrains.dokka") version "2.1.0"
alias(libs.plugins.ksp) apply false
alias(libs.plugins.dokka) apply false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work modernizing the build toolchain and dependencies. I found one small issue during my review, Please correct me if I am wrong. As per my investigation, we will face this issue after moving on Dokka 2.2.0

🚨 Blocking Issue: ./gradlew dokkaGenerate fails with Dokka 2.2.0

In build.gradle.kts, replacing id("org.jetbrains.dokka") version "2.1.0" with alias(libs.plugins.dokka) apply false switches the resolved Dokka version from 2.1.0 to 2.2.0 (dokka = "2.2.0" in libs.versions.toml).

Because this project currently uses android.builtInKotlin=false alongside com.android.library and org.jetbrains.kotlin.android, Dokka 2.2.0 registers both the androidJvm source set and the Android release source set pointing to src/main/java. Running ./gradlew dokkaGenerate (used by .github/workflows/docs.yml on release and Maven Javadoc JAR publishing) fails with:

Execution failed for task ':places-compose:dokkaGeneratePublicationHtml'
Pre-generation validity check failed: Source sets 'androidJvm' and 'release' have the common source roots... Every Kotlin source file should belong to only one source set (module).

Suggested Fix

Please add configureDokka() in build-logic/convention/src/main/kotlin/PublishingConventionPlugin.kt to suppress non-androidJvm duplicate source sets:

    override fun apply(project: Project) {
        project.run {
            applyPlugins()
            configureDokka()
            configureJacoco()
            configureVanniktechPublishing()
        }
    }

    private fun Project.configureDokka() {
        extensions.configure<org.jetbrains.dokka.gradle.DokkaExtension> {
            dokkaSourceSets.configureEach {
                suppress.set(name != "androidJvm")
            }
        }
    }

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added configureDokka() to PublishingConventionPlugin.kt suppressing non-androidJvm source sets as suggested. Verified that ./gradlew dokkaGenerate now succeeds cleanly without issues. Thanks for catching this and providing the exact solution!

}

allprojects {
Expand Down
35 changes: 18 additions & 17 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
[versions]
accompanistPermissions = "0.37.3"
activityCompose = "1.13.0"
agp = "9.2.0"
appcompat = "1.7.1"
composeBom = "2026.04.01"
coreKtx = "1.18.0"
agp = "9.3.2"
appcompat = "1.8.0"
composeBom = "2026.08.00"
coreKtx = "1.19.0"
dokka = "2.2.0"
espressoCore = "3.7.0"
gson = "2.14.0"
hiltVersion = "2.59.2"
hiltVersion = "2.60.1"
junit = "4.13.2"
junitVersion = "1.3.0"
kotlin = "2.3.21"
kotlinReflect = "2.3.21"
kotlinxCoroutinesPlayServices = "1.10.2"
ksp = "2.3.2"
lifecycleRuntimeKtx = "2.10.0"
lifecycleViewmodelCompose = "2.10.0"
mapsCompose = "8.3.0"
mapsUtilsKtx = "6.0.1"
kotlinxCoroutinesPlayServices = "1.11.0"
ksp = "2.3.11"
lifecycleRuntimeKtx = "2.11.0"
lifecycleViewmodelCompose = "2.11.0"
mapsCompose = "8.5.0"
mapsUtilsKtx = "6.3.0"
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
material-icons = "1.7.8"
materialVersion = "1.13.0"
navigationCompose = "2.9.8"
materialVersion = "1.14.0"
navigationCompose = "2.10.0"
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
kover = "0.9.9"
places = "5.2.0"
places = "5.3.0"
robolectric = "4.16.1"
secretsGradlePlugin = "2.0.1"
truth = "1.4.5"
uiTestAndroid = "1.11.0"
uiToolingVersion = "1.11.0"
gradleMavenPublishPlugin = "0.36.0"
uiTestAndroid = "1.12.0"
uiToolingVersion = "1.12.0"
gradleMavenPublishPlugin = "0.37.0"
mockk = "1.14.11"
startup-runtime = "1.2.0"
androidxTestCoreKtx = "1.7.0"
Expand Down Expand Up @@ -93,6 +93,7 @@
android-application = { id = "com.android.application", version.ref = "agp" }
androidLibrary = { id = "com.android.library", version.ref = "agp" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hiltVersion" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
Expand Down