That’s great to hear you’re planning Kotlin support. Would this library be a KMM module that could compile for both android/jvm and ios/native targets? That’s my goal with the wrapper API I’ve been working on. So far it’s been coming along nicely. The way you’ve implemented the Couchbase Lite SDKs with a consistent API between languages has made this mostly straightforward for anything that doesn’t touch a low-level platform dependency. At this point the ones I’ve come across are:
- Date/NSDate (I’ve replaced with kotlinx-datetime)
- Executor / dispatch queue (might be adaptable to coroutines)
- InputStream/NSInputStream (might be adaptable to kotlinx-io in the future)
- URL/NSURL (also possibly kotlinx-io, but replaced with raw strings in some cases for now)
- Certificate/SecCertificateRef (raw ByteArray/NSData in some cases, not clear in others)
But the large majority of the API lines up very well, needing only basic type conversions in some instances.
The couchbase-lite-kotlin library has some great extensions that make the query syntax much more concise. The reactive Flow extensions are also really useful. I’ve written some additional extensions besides utilizing these to take advantage of Couchbase’s live query and document change listener abilities using Kotlin Flow.
I’ll send you an email with more details as I gather more insight with how our KMM shared module evolves.