From 242db418de802e4950fbfc3d3398f6bc72e87e95 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Wed, 23 Aug 2023 17:31:25 +0200 Subject: [PATCH 1/2] Adapt to new api introduced in kiwix/libkiwix#991 --- lib/src/main/cpp/libkiwix/kiwixserver.cpp | 2 +- lib/src/main/cpp/libkiwix/library.cpp | 2 +- lib/src/main/cpp/libkiwix/manager.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 From 3ddfeb854000e7df11070fd0e712066a660ec1ba Mon Sep 17 00:00:00 2001 From: Emmanuel Engelhart Date: Mon, 20 Nov 2023 16:16:03 +0100 Subject: [PATCH 2/2] Bump-up to libzim 9.0.0 et libkiwix 13.0.0 --- lib/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 {