realm / realm-kotlin

Kotlin Multiplatform and Android SDK for the Realm Mobile Database: Build Better Apps Faster.
Apache License 2.0
878 stars 52 forks source link

Always unpacking JVM native lib when using SNAPSHOT version #1786

Open nhachicha opened 1 week ago

nhachicha commented 1 week ago

Fixes https://github.com/realm/realm-kotlin/issues/1715

This was tested locally by adding a JVM test that checks the schema version

assertEquals(realm.schemaVersion(), 42)

Then on AS edit the Core method realm_get_schema_version (inside https://github.com/realm/realm-core/blob/master/src/realm/object-store/c_api/schema.cpp#L52-L56) to return a different version which should compile a new native shared library to be extracted which has the new value. Observe that the test passes with the modified version .

Note: Obviously If you edit the buildSrc/src/main/kotlin/Config.kt to use a named version locally this work around won't work