diff --git a/CHANGELOG.md b/CHANGELOG.md index a8514c747d..92524284db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - None. ### Enhancements -- None. +- Improved mechanism for unpacking of JVM native libs suitable for local development. (Issue [#1715](https://github.com/realm/realm-kotlin/issues/1715) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1065)). ### Fixed - None. diff --git a/packages/cinterop/src/jvmMain/kotlin/io/realm/kotlin/jvm/SoLoader.kt b/packages/cinterop/src/jvmMain/kotlin/io/realm/kotlin/jvm/SoLoader.kt index 2bf019be67..e30197adf4 100644 --- a/packages/cinterop/src/jvmMain/kotlin/io/realm/kotlin/jvm/SoLoader.kt +++ b/packages/cinterop/src/jvmMain/kotlin/io/realm/kotlin/jvm/SoLoader.kt @@ -61,7 +61,7 @@ class SoLoader { // path should be /io.realm.kotlin/libraryVersion]/librealmffi.so // if the full path exists then load it otherwise unpack and load it. val libraryInstallationLocation: File = defaultAbsolutePath(libraryName) - if (!libraryInstallationLocation.exists()) { + if (!libraryInstallationLocation.exists() || SDK_VERSION.endsWith("-SNAPSHOT", ignoreCase = true)) { unpackAndInstall(libraryName, libraryInstallationLocation) } @Suppress("UnsafeDynamicallyLoadedCode")