diff --git a/aws-runtime/build.gradle.kts b/aws-runtime/build.gradle.kts index 442fbe701f1..ac150b0abb1 100644 --- a/aws-runtime/build.gradle.kts +++ b/aws-runtime/build.gradle.kts @@ -79,4 +79,12 @@ dependencies { it.plugins.apply("dokka-convention") // Apply the Dokka conventions plugin to the subproject dokka(project(it.path)) // Aggregate the subprojects' generated documentation } + + // Preserve Dokka v1 module paths + // https://kotlinlang.org/docs/dokka-migration.html#revert-to-the-dgp-v1-directory-behavior + subprojects { + dokka { + modulePath = this@subprojects.name + } + } } diff --git a/hll/build.gradle.kts b/hll/build.gradle.kts index 23d9ac0e128..f91bcacb4cf 100644 --- a/hll/build.gradle.kts +++ b/hll/build.gradle.kts @@ -96,22 +96,39 @@ subprojects { } } +// Projects to ignore for API validation and documentation generation +val projectsToIgnore = listOf( + "hll-codegen", + "dynamodb-mapper-codegen", + "dynamodb-mapper-ops-codegen", + "dynamodb-mapper-schema-codegen", + "dynamodb-mapper-schema-generator-plugin-test", +).filter { it in subprojects.map { it.name }.toSet() } // Some projects may not be in the build depending on bootstrapping + apiValidation { - val availableSubprojects = subprojects.map { it.name }.toSet() - - ignoredProjects += listOf( - "hll-codegen", - "dynamodb-mapper-codegen", - "dynamodb-mapper-ops-codegen", - "dynamodb-mapper-schema-codegen", - "dynamodb-mapper-schema-generator-plugin-test", - ).filter { it in availableSubprojects } // Some projects may not be in the build depending on bootstrapping + ignoredProjects += projectsToIgnore } // Configure Dokka for subprojects dependencies { subprojects.forEach { - it.plugins.apply("dokka-convention") // Apply the Dokka conventions plugin to the subproject - dokka(project(it.path)) // Aggregate the subproject's generated documentation + if (it.name !in projectsToIgnore) { + it.plugins.apply("dokka-convention") // Apply the Dokka conventions plugin to the subproject + dokka(project(it.path)) // Aggregate the subproject's generated documentation + } + } + + // Preserve Dokka v1 module paths + // https://kotlinlang.org/docs/dokka-migration.html#revert-to-the-dgp-v1-directory-behavior + subprojects { + val subProjectName = this@subprojects.name + + if (subProjectName in projectsToIgnore) { + return@subprojects + } + + dokka { + modulePath = subProjectName + } } } diff --git a/hll/dynamodb-mapper/dynamodb-mapper/build.gradle.kts b/hll/dynamodb-mapper/dynamodb-mapper/build.gradle.kts index 6d958622961..53ad4cd2875 100644 --- a/hll/dynamodb-mapper/dynamodb-mapper/build.gradle.kts +++ b/hll/dynamodb-mapper/dynamodb-mapper/build.gradle.kts @@ -26,6 +26,7 @@ buildscript { plugins { alias(libs.plugins.ksp) + `dokka-convention` } kotlin { diff --git a/services/build.gradle.kts b/services/build.gradle.kts index c58178b9ecd..1a2bc2db6b8 100644 --- a/services/build.gradle.kts +++ b/services/build.gradle.kts @@ -152,4 +152,12 @@ dependencies { it.plugins.apply("dokka-convention") // Apply the Dokka conventions plugin to the subproject dokka(project(it.path)) // Aggregate the subproject's generated documentation } + + // Preserve Dokka v1 module paths + // https://kotlinlang.org/docs/dokka-migration.html#revert-to-the-dgp-v1-directory-behavior + subprojects { + dokka { + modulePath = this@subprojects.name + } + } }