Search code examples
androidkotlinkotlin-dokka

Ignore base class View public functions in Subclass documentation with Dokka


I generated documentation with Dokka for a View subclass. Works well, but the docs include the hundreds of public functions of the base View class. Is there a way to only document my subclass public functions?

I tried adding these options to the Gradle task but I don't think this is what it was meant for:

dokkaHtml {
    dokkaSourceSets {

        create("main") {
            noAndroidSdkLink = true
            perPackageOption {
                skipEmptyPackages = true

                includeNonPublic = false

                prefix = " android.view.View"

                suppress = true
            }
        }
    }
}

Solution

  • You can use following line on your gradle file

    tasks.withType(DokkaTask.class) {   
     //other configurations
    
    
        suppressInheritedMembers.set(true)
    }