diff --git a/lib/build.gradle b/lib/build.gradle index 4944ca3..03d93fe 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -23,8 +23,8 @@ ext { } // Replace these versions with the latest available versions of libkiwix and libzim -ext.libkiwix_version = "12.1.0" -ext.libzim_version = "8.2.1" +ext.libkiwix_version = "13.0.0" +ext.libzim_version = "9.0.0" apply from: 'publish.gradle' android { diff --git a/lib/src/main/cpp/libkiwix/kiwixserver.cpp b/lib/src/main/cpp/libkiwix/kiwixserver.cpp index ae46afa..42bab5d 100644 --- a/lib/src/main/cpp/libkiwix/kiwixserver.cpp +++ b/lib/src/main/cpp/libkiwix/kiwixserver.cpp @@ -35,7 +35,7 @@ METHOD(void, setNativeServer, jobject jLibrary) { auto library = getPtr(env, jLibrary); - SET_PTR(std::make_shared(library.get())); + SET_PTR(std::make_shared(library)); } catch (std::exception& e) { throwException(env, "java/lang/Exception", "Error creating the server"); } CATCH_EXCEPTION() diff --git a/lib/src/main/cpp/libkiwix/library.cpp b/lib/src/main/cpp/libkiwix/library.cpp index 1ce3ccd..f65828b 100644 --- a/lib/src/main/cpp/libkiwix/library.cpp +++ b/lib/src/main/cpp/libkiwix/library.cpp @@ -31,7 +31,7 @@ /* Kiwix Reader JNI functions */ METHOD0(void, setNativeHandler) { - SET_PTR(std::make_shared()); + SET_PTR(NATIVE_TYPE::create()); } CATCH_EXCEPTION() DISPOSE diff --git a/lib/src/main/cpp/libkiwix/manager.cpp b/lib/src/main/cpp/libkiwix/manager.cpp index 5d0bbbf..6171574 100644 --- a/lib/src/main/cpp/libkiwix/manager.cpp +++ b/lib/src/main/cpp/libkiwix/manager.cpp @@ -31,7 +31,7 @@ METHOD(void, allocate, jobject libraryObj) { auto lib = getPtr(env, libraryObj); - SET_PTR(std::make_shared(lib.get())); + SET_PTR(std::make_shared(lib)); } CATCH_EXCEPTION() DISPOSE