File tree Expand file tree Collapse file tree 6 files changed +23
-14
lines changed
src/main/java/org/kiwix/kiwixmobile/core Expand file tree Collapse file tree 6 files changed +23
-14
lines changed Original file line number Diff line number Diff line change @@ -100,9 +100,6 @@ play {
100100
101101dependencies {
102102 androidTestImplementation(Libs .leakcanary_android_instrumentation)
103- implementation(" com.getkeepsafe.relinker:relinker:1.4.5" )
104- api(fileTree(mapOf (" include" to " *.aar" , " dir" to " libs" )))
105- implementation(files(" /home/hp-pc03/Desktop/lib-release.aar" ))
106103}
107104task(" generateVersionCodeAndName" ) {
108105 val file = File (" VERSION_INFO" )
Original file line number Diff line number Diff line change @@ -344,4 +344,9 @@ object Libs {
344344 * https://developer.android.com/testing
345345 */
346346 const val junit: String = " androidx.test.ext:junit:" + Versions .junit
347+
348+ /* *
349+ * https://github.com/KeepSafe/ReLinker
350+ */
351+ const val relinker: String = " com.getkeepsafe.relinker:relinker:" + Versions .relinker
347352}
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ object Versions {
8686
8787 const val core_ktx: String = " 1.3.2"
8888
89- const val kiwixlib: String = " 10.1.1 "
89+ const val kiwixlib: String = " 11.0.0 "
9090
9191 const val material: String = " 1.2.1"
9292
@@ -101,6 +101,8 @@ object Versions {
101101 const val webkit: String = " 1.3.0"
102102
103103 const val junit: String = " 1.1.4"
104+
105+ const val relinker: String = " 1.4.5"
104106}
105107
106108/* *
Original file line number Diff line number Diff line change @@ -60,16 +60,14 @@ dependencies {
6060 implementation(Libs .threetenabp)
6161
6262 // Get kiwixlib online if it is not populated locally
63- implementation(" com.getkeepsafe.relinker:relinker:1.4.5" )
64- api(fileTree(mapOf (" include" to " *.aar" , " dir" to " libs" )))
65- implementation(files(" /home/hp-pc03/Desktop/lib-release.aar" ))
66- // if (!shouldUseLocalVersion()) {
67- // api(Libs.kiwixlib)
68- // } else {
69- // implementation("com.getkeepsafe.relinker:relinker:1.4.5")
70- // api(fileTree(mapOf("include" to "*.aar", "dir" to "libs")))
71- // implementation(files("/home/hp-pc03/Desktop/lib-release.aar"))
72- // }
63+ if (! shouldUseLocalVersion()) {
64+ api(Libs .kiwixlib)
65+ } else {
66+ api(fileTree(mapOf (" include" to " *.aar" , " dir" to " libs" )))
67+ }
68+
69+ // Relinker to load libkiwix
70+ implementation(Libs .relinker)
7371
7472 // Document File
7573 implementation(Libs .select_folder_document_file)
Original file line number Diff line number Diff line change 3131 <ID >MagicNumber:Seconds.kt$Seconds$60</ID >
3232 <ID >MagicNumber:Seconds.kt$Seconds$60.0</ID >
3333 <ID >MagicNumber:TabsAdapter.kt$TabsAdapter$8</ID >
34+ <ID >MagicNumber:ZimFileReader.kt$ZimFileReader$1024</ID >
3435 <ID >MatchingDeclarationName:PageTestHelpers.kt$PageImpl : Page</ID >
3536 <ID >MaxLineLength:BookUtilsTest.kt$BookUtilsTest$// this case uses the result from the container nested class inside LanguageUtils. It will be tested in LanguageUtilsTest</ID >
3637 <ID >MaxLineLength:MetaLinkNetworkEntityTest.kt$MetaLinkNetworkEntityTest$"http://www.mirrorservice.org/sites/download.kiwix.org/zim/wikipedia/wikipedia_af_all_nopic_2016-05.zim"</ID >
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ package org.kiwix.kiwixmobile.core
1919
2020import android.content.Context
2121import android.util.Log
22+ import com.getkeepsafe.relinker.ReLinker
2223import org.kiwix.libkiwix.JNIKiwix
2324import org.kiwix.kiwixmobile.core.utils.TAG_KIWIX
2425import java.io.File
@@ -27,6 +28,11 @@ import javax.inject.Inject
2728
2829internal class JNIInitialiser @Inject constructor(context : Context , jniKiwix : JNIKiwix ) {
2930 init {
31+ /* Load wrapper's .so files which we have missed to load in libkiwix
32+ More information here https://github.com/kiwix/java-libkiwix/issues/39
33+ */
34+ ReLinker .loadLibrary(context, " kiwix_wrapper" )
35+ ReLinker .loadLibrary(context, " zim_wrapper" )
3036 // loadICUData(context)?.let(jniKiwix::setDataDirectory)
3137 }
3238
You can’t perform that action at this time.
0 commit comments