Skip to content

Commit 17e92c2

Browse files
authored
Always unpacking JVM native lib when using SNAPSHOT version (#1786)
1 parent 18b4def commit 17e92c2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- None.
55

66
### Enhancements
7-
- None.
7+
- 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)).
88

99
### Fixed
1010
- None.

packages/cinterop/src/jvmMain/kotlin/io/realm/kotlin/jvm/SoLoader.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class SoLoader {
6161
// path should be <default user lib dir>/io.realm.kotlin/libraryVersion]/librealmffi.so
6262
// if the full path exists then load it otherwise unpack and load it.
6363
val libraryInstallationLocation: File = defaultAbsolutePath(libraryName)
64-
if (!libraryInstallationLocation.exists()) {
64+
if (!libraryInstallationLocation.exists() || SDK_VERSION.endsWith("-SNAPSHOT", ignoreCase = true)) {
6565
unpackAndInstall(libraryName, libraryInstallationLocation)
6666
}
6767
@Suppress("UnsafeDynamicallyLoadedCode")

0 commit comments

Comments
 (0)