@@ -96,22 +96,39 @@ subprojects {
96
96
}
97
97
}
98
98
99
+ // Projects to ignore for API validation and documentation generation
100
+ val projectsToIgnore = listOf (
101
+ " hll-codegen" ,
102
+ " dynamodb-mapper-codegen" ,
103
+ " dynamodb-mapper-ops-codegen" ,
104
+ " dynamodb-mapper-schema-codegen" ,
105
+ " dynamodb-mapper-schema-generator-plugin-test" ,
106
+ ).filter { it in subprojects.map { it.name }.toSet() } // Some projects may not be in the build depending on bootstrapping
107
+
99
108
apiValidation {
100
- val availableSubprojects = subprojects.map { it.name }.toSet()
101
-
102
- ignoredProjects + = listOf (
103
- " hll-codegen" ,
104
- " dynamodb-mapper-codegen" ,
105
- " dynamodb-mapper-ops-codegen" ,
106
- " dynamodb-mapper-schema-codegen" ,
107
- " dynamodb-mapper-schema-generator-plugin-test" ,
108
- ).filter { it in availableSubprojects } // Some projects may not be in the build depending on bootstrapping
109
+ ignoredProjects + = projectsToIgnore
109
110
}
110
111
111
112
// Configure Dokka for subprojects
112
113
dependencies {
113
114
subprojects.forEach {
114
- it.plugins.apply (" dokka-convention" ) // Apply the Dokka conventions plugin to the subproject
115
- dokka(project(it.path)) // Aggregate the subproject's generated documentation
115
+ if (it.name !in projectsToIgnore) {
116
+ it.plugins.apply (" dokka-convention" ) // Apply the Dokka conventions plugin to the subproject
117
+ dokka(project(it.path)) // Aggregate the subproject's generated documentation
118
+ }
119
+ }
120
+
121
+ // Preserve Dokka v1 module paths
122
+ // https://kotlinlang.org/docs/dokka-migration.html#revert-to-the-dgp-v1-directory-behavior
123
+ subprojects {
124
+ val subProjectName = this @subprojects.name
125
+
126
+ if (subProjectName in projectsToIgnore) {
127
+ return @subprojects
128
+ }
129
+
130
+ dokka {
131
+ modulePath = subProjectName
132
+ }
116
133
}
117
134
}
0 commit comments