realm / realm-java

Realm is a mobile database: a replacement for SQLite & ORMs
http://realm.io
Apache License 2.0
11.45k stars 1.75k forks source link

How to build MacOS .dylib file? #7679

Closed seabornlee closed 2 years ago

seabornlee commented 2 years ago

Problem

Dear maintainers

I am trying to get Realm working with Robolectric. I saw in the official documents saying it's not supported, and also saw the feature request to the Robolectric team https://github.com/realm/realm-java/issues/904.

I am thinking, you have realm-jni, so it should be possible to call from Java code. I am working on Mac OS, the problem is I can't build a .dylib from gradle tasks. The .so is generated.

Solution

It will be great if you can build .dylib by calling gradle task with argument.

Alternatives

No response

How important is this improvement for you?

Would be a major improvement

cmelchior commented 2 years ago

Hi @seabornlee

That is correct, in theory, we could build a .dylib but it would be significant work, so unlikely to happen soon.

Our Realm Kotlin SDK has this support built in already, so depending on your use case, you might consider switching to that: https://github.com/realm/realm-kotlin

seabornlee commented 2 years ago

Hi @seabornlee

That is correct, in theory, we could build a .dylib but it would be significant work, so unlikely to happen soon.

Our Realm Kotlin SDK has this support built in already, so depending on your use case, you might consider switching to that: https://github.com/realm/realm-kotlin

Thanks @cmelchior ! That is awesome! I will check it out right now.