@@ -168,6 +168,7 @@ abstract class DackkaPlugin : Plugin<Project> {
168
168
val classpath = compileConfiguration.getJars() + project.javadocConfig.getJars() + project.files(bootClasspath)
169
169
170
170
val sourcesForJava = sourceSets.flatMap {
171
+ // TODO(b/246984444): Investigate why kotlinDirectories includes javaDirectories
171
172
it.javaDirectories.map { it.absoluteFile }
172
173
}
173
174
@@ -177,13 +178,12 @@ abstract class DackkaPlugin : Plugin<Project> {
177
178
}
178
179
179
180
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)
183
184
val packageLists = fetchPackageLists(project)
184
185
185
- if (! isKotlin) dependsOn(docStubs)
186
- val excludedFiles = if (! isKotlin) projectSpecificSuppressedFiles(project) else emptyList()
186
+ val excludedFiles = projectSpecificSuppressedFiles(project)
187
187
val fixedJavaSources = if (! isKotlin) listOf (project.docStubs) else sourcesForJava
188
188
189
189
javaSources.set(fixedJavaSources)
@@ -206,11 +206,20 @@ abstract class DackkaPlugin : Plugin<Project> {
206
206
include(" **/package-list" )
207
207
}.toList()
208
208
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
+
209
218
// TODO(b/243534168): Remove when fixed
210
219
private fun projectSpecificSuppressedFiles (project : Project ): List <File > =
211
220
when (project.name) {
212
221
" 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()
214
223
}
215
224
" firebase-firestore" -> {
216
225
project.files(" ${project.docStubs} /com/google/firebase/Timestamp.java" ).toList()
@@ -226,6 +235,7 @@ abstract class DackkaPlugin : Plugin<Project> {
226
235
227
236
dackkaJarFile.set(dackkaFile)
228
237
outputDirectory.set(dackkaOutputDirectory)
238
+ clientName.set(project.firebaseConfigValue { artifactId })
229
239
}
230
240
231
241
// TODO(b/243833009): Make task cacheable
0 commit comments