2

I'm using Dokka v0.9.17 for Android. When I run ./gradlew dokka it generates the docs but it include so many packages that I don't care about like android.support.fragment and packages for all the third party libraries. How can I tell Dokka to only generate doc for my code?

How can I remove Dagger _Factory files from the doc?

My configuration is like this

dokka {
    moduleName = 'app'
    outputFormat = 'html'
    outputDirectory = "$buildDir/javadoc"
    includeNonPublic = true
    skipEmptyPackages = true
    noStdlibLink = true
}
Alireza Ahmadi
  • 5,122
  • 7
  • 40
  • 67

1 Answers1

0

Paragones had the correct answer to a different so issue

https://github.com/Kotlin/dokka/issues/258

namely you need to add this task and modify it to only delete the stuff you want deleted:

task deleteUnusedDokkaAssets(type: Delete) {
  file("$rootDir/docs").listFiles().each {        
    if(it.name.contains("android.R")) project.delete it
    if(it.name.contains("android.support")) project.delete it
    if(it.name.contains("com.google")) project.delete it  
    if(it.name.contains("com.crashlytics")) project.delete it
  }
}

note you will not need the android.R line with the updated version of dokka

Greg
  • 10,360
  • 6
  • 44
  • 67
Fred Grott
  • 3,505
  • 1
  • 23
  • 18