Skip to content

Commit d5ca036

Browse files
committed
Fix: Java JAR contains native library twice
1 parent 782fb3d commit d5ca036

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

build.gradle

-4
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,6 @@ test {
118118

119119
jar {
120120
dependsOn("usearchSharedLibrary")
121-
from("$buildDir/libs/usearch/shared") {
122-
include "libusearch.so", "libusearch.dylib", "libusearch.dll"
123-
into "usearch"
124-
}
125121
from sourceSets.main.output
126122
}
127123

java/cloud/unum/usearch/Index.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,9 @@ public Config expansion_search(long _expansion_search) {
375375
} catch (UnsatisfiedLinkError e) {
376376
try {
377377
if (System.getProperty("os.name").equals("Mac OS X")) {
378-
NativeUtils.loadLibraryFromJar("/usearch/libusearch.dylib");
378+
NativeUtils.loadLibraryFromJar("/usearch/shared/libusearch.dylib");
379379
} else {
380-
NativeUtils.loadLibraryFromJar("/usearch/libusearch.so");
380+
NativeUtils.loadLibraryFromJar("/usearch/shared/libusearch.so");
381381
}
382382
} catch (IOException e1) {
383383
throw new RuntimeException(e1);

0 commit comments

Comments
 (0)