Skip to content

Publish KDoc API docs to GitHub Pages with Dokka #15

Description

@chaudhary-lakshay

The public API is thoroughly KDoc'd — SweepView, SweepStream, ClockAligner and the filter chain all carry real explanations, several of which are the best available account of why the design is what it is. None of it is published. To read any of it you have to clone the repo and open the source.

For a library people are meant to evaluate before adopting, that's a lot of good writing sitting where nobody will find it.

What to do

Add Dokka to the :sweepwave module and publish the HTML to GitHub Pages:

  • Dokka Gradle plugin, dokkaHtml configured for the library module only.
  • A job (on the existing ci.yml, or its own workflow) that builds the docs and pushes to gh-pages on tagged releases only — running it on every push to main turns the Pages deploy into noise.
  • Link the published site from the README header, beside the CI and JitPack badges.

Notes

  • Point Dokka's externalDocumentationLink at the Android SDK docs, so SurfaceView, Canvas and friends resolve to real links instead of bare type names.
  • sourceLink makes every symbol link back to its line on GitHub. Cheap to configure and probably the single most useful thing in a generated doc site.
  • Check that :demo is excluded — publishing DemoActivity's API surface helps nobody.

Infrastructure rather than features, but it's the kind of thing that makes a library look maintained to someone deciding whether to depend on it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationhelp wantedExtra attention is needed

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions