@@ -168,6 +168,7 @@ abstract class DackkaPlugin : Plugin<Project> {
168168 val classpath = compileConfiguration.getJars() + project.javadocConfig.getJars() + project.files(bootClasspath)
169169
170170 val sourcesForJava = sourceSets.flatMap {
171+ // TODO(b/246984444): Investigate why kotlinDirectories includes javaDirectories
171172 it.javaDirectories.map { it.absoluteFile }
172173 }
173174
@@ -177,13 +178,12 @@ abstract class DackkaPlugin : Plugin<Project> {
177178 }
178179
179180 docsTask.configure {
180- clientName.set(project.firebaseConfigValue { artifactId } )
181- // this will become useful with the agp upgrade, as they're separate in 7.x+
182- val sourcesForKotlin = emptyList<File >()
181+ if ( ! isKotlin) dependsOn(docStubs )
182+
183+ val sourcesForKotlin = emptyList<File >() + projectSpecificSources(project)
183184 val packageLists = fetchPackageLists(project)
184185
185- if (! isKotlin) dependsOn(docStubs)
186- val excludedFiles = if (! isKotlin) projectSpecificSuppressedFiles(project) else emptyList()
186+ val excludedFiles = projectSpecificSuppressedFiles(project)
187187 val fixedJavaSources = if (! isKotlin) listOf (project.docStubs) else sourcesForJava
188188
189189 javaSources.set(fixedJavaSources)
@@ -206,11 +206,20 @@ abstract class DackkaPlugin : Plugin<Project> {
206206 include(" **/package-list" )
207207 }.toList()
208208
209+ // TODO(b/243534168): Remove when fixed
210+ private fun projectSpecificSources (project : Project ) =
211+ when (project.name) {
212+ " firebase-common" -> {
213+ project.project(" :firebase-firestore" ).files(" src/main/java/com/google/firebase" ).toList()
214+ }
215+ else -> emptyList()
216+ }
217+
209218 // TODO(b/243534168): Remove when fixed
210219 private fun projectSpecificSuppressedFiles (project : Project ): List <File > =
211220 when (project.name) {
212221 " firebase-common" -> {
213- project.files( " ${project.docStubs} /com/google/firebase/firestore" ).toList()
222+ project.project( " :firebase-firestore " ).files( " src/main/java /com/google/firebase/firestore" ).toList()
214223 }
215224 " firebase-firestore" -> {
216225 project.files(" ${project.docStubs} /com/google/firebase/Timestamp.java" ).toList()
@@ -226,6 +235,7 @@ abstract class DackkaPlugin : Plugin<Project> {
226235
227236 dackkaJarFile.set(dackkaFile)
228237 outputDirectory.set(dackkaOutputDirectory)
238+ clientName.set(project.firebaseConfigValue { artifactId })
229239 }
230240
231241 // TODO(b/243833009): Make task cacheable
0 commit comments