Objectbox-java: Kotlin-Native support for multiplatform development

Created on 4 Nov 2018  路  10Comments  路  Source: objectbox/objectbox-java

is there any way that i can use objectbox in kotlin native module and share the bussiness logics in android and ios modules ?

feature

All 10 comments

This would require major changes, so it's nothing we could do on the fly. Let's see how many people would be interested in this.

I don't think this is an objectbox issue. Objectbox is just an external library for the Android platform and it has to exist within an Android module, nothing can be shared on other platforms with regards to ObjectBox. You can, however, have a local data source interface for your models that will be implemented on each platform separately and ObjectBox will do that for the Android platform.

I don't think this is an objectbox issue. Objectbox is just an external library for the Android platform and it has to exist within an Android module

The 4th item on objectbox.io is "cross platform", and supporting Kotlin/Native would allow using ObjectBox in cross platform projects, which is currently not possible without implementing a higher level abstraction layer.

It does seem like a major change, it would at least require converting all the java classes to kotlin, and in the native implementation, call the C library from kotlin instead of using JNI.

is there an internal branch for this? can we make any contributions?

Any update about this?

Would love to have this

It does seem like a major change, it would at least require converting all the java classes to kotlin, and in the native implementation, call the C library from kotlin instead of using JNI.

Very good observation. Because of that effort, we'll watch how much interest this feature request generates. With our limited resources, we will not start on this immediately though.

There is a theoretic approach using the C API with Kotlin MP, but that is won't be (as) pretty...

It does seem like a major change, it would at least require converting all the java classes to kotlin, and in the native implementation, call the C library from kotlin instead of using JNI.

Very good observation. Because of that effort, we'll watch how much interest this feature request generates. With our limited resources, we will not start on this immediately though.

There is a theoretic approach using the C API with Kotlin MP, but that is won't be (as) pretty...

Has anyone attempted this?

+1

would also like to have this

Was this page helpful?
0 / 5 - 0 ratings