mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
Start using libkiwix 11.0.0 from maven, loading wrappers .so files for fixing the jni crash which we have missed loading in libkiwix
This commit is contained in:
parent
db195f8d3d
commit
02f2600270
@ -100,9 +100,6 @@ play {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
androidTestImplementation(Libs.leakcanary_android_instrumentation)
|
androidTestImplementation(Libs.leakcanary_android_instrumentation)
|
||||||
implementation("com.getkeepsafe.relinker:relinker:1.4.5")
|
|
||||||
api(fileTree(mapOf("include" to "*.aar", "dir" to "libs")))
|
|
||||||
implementation(files("/home/hp-pc03/Desktop/lib-release.aar"))
|
|
||||||
}
|
}
|
||||||
task("generateVersionCodeAndName") {
|
task("generateVersionCodeAndName") {
|
||||||
val file = File("VERSION_INFO")
|
val file = File("VERSION_INFO")
|
||||||
|
@ -344,4 +344,9 @@ object Libs {
|
|||||||
* https://developer.android.com/testing
|
* https://developer.android.com/testing
|
||||||
*/
|
*/
|
||||||
const val junit: String = "androidx.test.ext:junit:" + Versions.junit
|
const val junit: String = "androidx.test.ext:junit:" + Versions.junit
|
||||||
|
|
||||||
|
/**
|
||||||
|
* https://github.com/KeepSafe/ReLinker
|
||||||
|
*/
|
||||||
|
const val relinker: String = "com.getkeepsafe.relinker:relinker:" + Versions.relinker
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ object Versions {
|
|||||||
|
|
||||||
const val core_ktx: String = "1.3.2"
|
const val core_ktx: String = "1.3.2"
|
||||||
|
|
||||||
const val kiwixlib: String = "10.1.1"
|
const val kiwixlib: String = "11.0.0"
|
||||||
|
|
||||||
const val material: String = "1.2.1"
|
const val material: String = "1.2.1"
|
||||||
|
|
||||||
@ -101,6 +101,8 @@ object Versions {
|
|||||||
const val webkit: String = "1.3.0"
|
const val webkit: String = "1.3.0"
|
||||||
|
|
||||||
const val junit: String = "1.1.4"
|
const val junit: String = "1.1.4"
|
||||||
|
|
||||||
|
const val relinker: String = "1.4.5"
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,16 +60,14 @@ dependencies {
|
|||||||
implementation(Libs.threetenabp)
|
implementation(Libs.threetenabp)
|
||||||
|
|
||||||
// Get kiwixlib online if it is not populated locally
|
// Get kiwixlib online if it is not populated locally
|
||||||
implementation("com.getkeepsafe.relinker:relinker:1.4.5")
|
if (!shouldUseLocalVersion()) {
|
||||||
|
api(Libs.kiwixlib)
|
||||||
|
} else {
|
||||||
api(fileTree(mapOf("include" to "*.aar", "dir" to "libs")))
|
api(fileTree(mapOf("include" to "*.aar", "dir" to "libs")))
|
||||||
implementation(files("/home/hp-pc03/Desktop/lib-release.aar"))
|
}
|
||||||
// if (!shouldUseLocalVersion()) {
|
|
||||||
// api(Libs.kiwixlib)
|
// Relinker to load libkiwix
|
||||||
// } else {
|
implementation(Libs.relinker)
|
||||||
// implementation("com.getkeepsafe.relinker:relinker:1.4.5")
|
|
||||||
// api(fileTree(mapOf("include" to "*.aar", "dir" to "libs")))
|
|
||||||
// implementation(files("/home/hp-pc03/Desktop/lib-release.aar"))
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Document File
|
// Document File
|
||||||
implementation(Libs.select_folder_document_file)
|
implementation(Libs.select_folder_document_file)
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
<ID>MagicNumber:Seconds.kt$Seconds$60</ID>
|
<ID>MagicNumber:Seconds.kt$Seconds$60</ID>
|
||||||
<ID>MagicNumber:Seconds.kt$Seconds$60.0</ID>
|
<ID>MagicNumber:Seconds.kt$Seconds$60.0</ID>
|
||||||
<ID>MagicNumber:TabsAdapter.kt$TabsAdapter$8</ID>
|
<ID>MagicNumber:TabsAdapter.kt$TabsAdapter$8</ID>
|
||||||
|
<ID>MagicNumber:ZimFileReader.kt$ZimFileReader$1024</ID>
|
||||||
<ID>MatchingDeclarationName:PageTestHelpers.kt$PageImpl : Page</ID>
|
<ID>MatchingDeclarationName:PageTestHelpers.kt$PageImpl : Page</ID>
|
||||||
<ID>MaxLineLength:BookUtilsTest.kt$BookUtilsTest$// this case uses the result from the container nested class inside LanguageUtils. It will be tested in LanguageUtilsTest</ID>
|
<ID>MaxLineLength:BookUtilsTest.kt$BookUtilsTest$// this case uses the result from the container nested class inside LanguageUtils. It will be tested in LanguageUtilsTest</ID>
|
||||||
<ID>MaxLineLength:MetaLinkNetworkEntityTest.kt$MetaLinkNetworkEntityTest$"http://www.mirrorservice.org/sites/download.kiwix.org/zim/wikipedia/wikipedia_af_all_nopic_2016-05.zim"</ID>
|
<ID>MaxLineLength:MetaLinkNetworkEntityTest.kt$MetaLinkNetworkEntityTest$"http://www.mirrorservice.org/sites/download.kiwix.org/zim/wikipedia/wikipedia_af_all_nopic_2016-05.zim"</ID>
|
||||||
|
@ -19,6 +19,7 @@ package org.kiwix.kiwixmobile.core
|
|||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
|
import com.getkeepsafe.relinker.ReLinker
|
||||||
import org.kiwix.libkiwix.JNIKiwix
|
import org.kiwix.libkiwix.JNIKiwix
|
||||||
import org.kiwix.kiwixmobile.core.utils.TAG_KIWIX
|
import org.kiwix.kiwixmobile.core.utils.TAG_KIWIX
|
||||||
import java.io.File
|
import java.io.File
|
||||||
@ -27,6 +28,11 @@ import javax.inject.Inject
|
|||||||
|
|
||||||
internal class JNIInitialiser @Inject constructor(context: Context, jniKiwix: JNIKiwix) {
|
internal class JNIInitialiser @Inject constructor(context: Context, jniKiwix: JNIKiwix) {
|
||||||
init {
|
init {
|
||||||
|
/* Load wrapper's .so files which we have missed to load in libkiwix
|
||||||
|
More information here https://github.com/kiwix/java-libkiwix/issues/39
|
||||||
|
*/
|
||||||
|
ReLinker.loadLibrary(context, "kiwix_wrapper")
|
||||||
|
ReLinker.loadLibrary(context, "zim_wrapper")
|
||||||
// loadICUData(context)?.let(jniKiwix::setDataDirectory)
|
// loadICUData(context)?.let(jniKiwix::setDataDirectory)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user