mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
Removed the relinker dependency from the project, since now we are loading the .so files on the libkiwix side. Enabled the loadICUData method, since now it is fixed on the libkiwix side. Search and server is now starting successfully, but need some refactoring, for that see next commit.
This commit is contained in:
parent
26ee7fbf1a
commit
7a6447c5da
@ -100,6 +100,9 @@ play {
|
||||
|
||||
dependencies {
|
||||
androidTestImplementation(Libs.leakcanary_android_instrumentation)
|
||||
api(fileTree(mapOf("include" to "*.aar", "dir" to "libs")))
|
||||
implementation("com.getkeepsafe.relinker:relinker:1.4.5")
|
||||
implementation(files("C:\\Users\\aades\\OneDrive\\Documents/lib-debug.aar"))
|
||||
}
|
||||
task("generateVersionCodeAndName") {
|
||||
val file = File("VERSION_INFO")
|
||||
|
@ -344,9 +344,4 @@ object Libs {
|
||||
* https://developer.android.com/testing
|
||||
*/
|
||||
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
|
||||
}
|
||||
|
@ -101,8 +101,6 @@ object Versions {
|
||||
const val webkit: String = "1.3.0"
|
||||
|
||||
const val junit: String = "1.1.4"
|
||||
|
||||
const val relinker: String = "1.4.5"
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -60,14 +60,15 @@ dependencies {
|
||||
implementation(Libs.threetenabp)
|
||||
|
||||
// Get kiwixlib online if it is not populated locally
|
||||
if (!shouldUseLocalVersion()) {
|
||||
api(Libs.kiwixlib)
|
||||
} else {
|
||||
api(fileTree(mapOf("include" to "*.aar", "dir" to "libs")))
|
||||
}
|
||||
// if (!shouldUseLocalVersion()) {
|
||||
// api(Libs.kiwixlib)
|
||||
// } else {
|
||||
// api(fileTree(mapOf("include" to "*.aar", "dir" to "libs")))
|
||||
// }
|
||||
|
||||
// Relinker to load libkiwix
|
||||
implementation(Libs.relinker)
|
||||
api(fileTree(mapOf("include" to "*.aar", "dir" to "libs")))
|
||||
implementation("com.getkeepsafe.relinker:relinker:1.4.5")
|
||||
implementation(files("C:\\Users\\aades\\OneDrive\\Documents/lib-debug.aar"))
|
||||
|
||||
// Document File
|
||||
implementation(Libs.select_folder_document_file)
|
||||
|
@ -19,7 +19,6 @@ package org.kiwix.kiwixmobile.core
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.getkeepsafe.relinker.ReLinker
|
||||
import org.kiwix.libkiwix.JNIKiwix
|
||||
import org.kiwix.kiwixmobile.core.utils.TAG_KIWIX
|
||||
import java.io.File
|
||||
@ -28,12 +27,7 @@ import javax.inject.Inject
|
||||
|
||||
internal class JNIInitialiser @Inject constructor(context: Context, jniKiwix: JNIKiwix) {
|
||||
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)
|
||||
}
|
||||
|
||||
private fun loadICUData(context: Context): String? {
|
||||
|
Loading…
x
Reference in New Issue
Block a user