GitLiveApp / firebase-kotlin-sdk

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

Use explicit API mode #535

Closed nbransby closed 3 months ago

nbransby commented 3 months ago

With explicit API mode, you must:

Add visibility modifiers to your declarations to make them public, instead of relying on the default public visibility. This ensures that you've considered what you're exposing as part of the public API.

Define the types for all your public functions and properties to prevent unintended changes to your API from inferred types.

https://kotlinlang.org/docs/whatsnew14.html#explicit-api-mode-for-library-authors

nbransby commented 3 months ago

@Daeda88 this would help with ensuring we don't unintentionally expose internal APIs as we still need to fix this (waiting for you response there btw)

Daeda88 commented 3 months ago

Great. I have a branch forked from my k2 brach that adds the binary compatibility validation. On holiday this week but I can add this to it when back. Will pr that branch once k2 is merged, but since I also added ktlint it's rather big so keeping it separate for readability

nbransby commented 3 months ago

That would be great! I would like to finish this PR and other breaking changes such as removing the exposed internal functions and roll it all into a single major version release, 2.0.0 (which also syncs nicely with upgrading to Kotlin 2.0)