GitLiveApp / firebase-kotlin-sdk

A Kotlin-first SDK for Firebase
https://gitliveapp.github.io/firebase-kotlin-sdk/
Apache License 2.0
979 stars 148 forks source link

Documentation with Dokka and KDoc #537

Closed BasBuijsen closed 1 week ago

BasBuijsen commented 1 week ago

This adds the setup of Dokka. This generates HTML based on the KDoc comments provided for every function and class. For now i didn't add them yet to all the classes since that is a huge chunk of work. I will incrementally add documentation, but for now only showing the signatures should suffice.

The publishing of the generated HTML still needs to be setup. I need @nbransby for that so that is out of my control.

Since all publicly available classes and functions will be shown in the documentation, this change will also improve the documentation a lot. It will make sure that only the classes and functions that are actually exposed will be documented.

nbransby commented 1 week ago

@Reedyuk what do you think is the best way to publish the documentation? is there a GitHub Action we can use to publish the dokka output to github pages?

@BasBuijsen do you have experience with publishing to GitHub pages?

nbransby commented 1 week ago

@BasBuijsen build failed due to the function you made internal that are needed by inline functions (can use @PublishedApi here)

BasBuijsen commented 1 week ago

@nbransby i dont have experience with publishing to github pages but from what ive seen it is very easy. There is a ready to go action that will do all the magic if you set the environment variables correctly, so i think that would be the easiest and probably cheapest solution (there is one website free per gh organisation or user).

I will fix the JS build this afternoon, after work :)

Reedyuk commented 1 week ago

https://github.com/kwebio/kweb-core/blob/master/.github/workflows/build.yml#L25

BasBuijsen commented 1 week ago

@Reedyuk thanks for adding the deployment steps!

Ive added documentation for nearly all modules now. Only authentication, analytics and firestore are left to do.

Reedyuk commented 1 week ago

I think rebase didnt work correctly, as its not compiling on the github servers.

BasBuijsen commented 1 week ago

I think rebase didnt work correctly, as its not compiling on the github servers.

Yes i made a mistake while resolving the merge conflict. Will fix it :)

Reedyuk commented 1 week ago

I think rebase didnt work correctly, as its not compiling on the github servers.

Yes i made a mistake while resolving the merge conflict. Will fix it :)

get this building on the ci and i will merge in and make sure the docs deploy correctly.

Reedyuk commented 1 week ago

@BasBuijsen - can you rebase this pull request please

BasBuijsen commented 1 week ago

@nbransby or @Reedyuk would it be okay to merge this pr now?

I will add comments to Auth and Firestore next week. Analytics is difficult because it doesn't have an open source codebase so i cant really copy the comments.

BasBuijsen commented 1 week ago

@Reedyuk when its deployed can you send me the url so i can add it to the readme when i create a new pr with the final documentation changes next week?