mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-08 23:07:26 -04:00
#1786 Upgrade kiwixlib - bump version and change JniKiwixLibrary->Library
This commit is contained in:
parent
6b105c1a53
commit
4d65a6a22b
@ -23,7 +23,7 @@ import android.app.Service
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import dagger.Module
|
import dagger.Module
|
||||||
import dagger.Provides
|
import dagger.Provides
|
||||||
import org.kiwix.kiwixlib.JNIKiwixLibrary
|
import org.kiwix.kiwixlib.Library
|
||||||
import org.kiwix.kiwixlib.JNIKiwixServer
|
import org.kiwix.kiwixlib.JNIKiwixServer
|
||||||
import org.kiwix.kiwixmobile.di.ServiceScope
|
import org.kiwix.kiwixmobile.di.ServiceScope
|
||||||
import org.kiwix.kiwixmobile.webserver.WebServerHelper
|
import org.kiwix.kiwixmobile.webserver.WebServerHelper
|
||||||
@ -38,7 +38,7 @@ class ServiceModule {
|
|||||||
@Provides
|
@Provides
|
||||||
@ServiceScope
|
@ServiceScope
|
||||||
fun providesWebServerHelper(
|
fun providesWebServerHelper(
|
||||||
jniKiwixLibrary: JNIKiwixLibrary,
|
jniKiwixLibrary: Library,
|
||||||
kiwixServer: JNIKiwixServer,
|
kiwixServer: JNIKiwixServer,
|
||||||
ipAddressCallbacks: IpAddressCallbacks
|
ipAddressCallbacks: IpAddressCallbacks
|
||||||
): WebServerHelper = WebServerHelper(jniKiwixLibrary, kiwixServer, ipAddressCallbacks)
|
): WebServerHelper = WebServerHelper(jniKiwixLibrary, kiwixServer, ipAddressCallbacks)
|
||||||
@ -50,11 +50,11 @@ class ServiceModule {
|
|||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@ServiceScope
|
@ServiceScope
|
||||||
fun providesJNIKiwixLibrary(): JNIKiwixLibrary = JNIKiwixLibrary()
|
fun providesLibrary(): Library = Library()
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@ServiceScope
|
@ServiceScope
|
||||||
fun providesJNIKiwixServer(jniKiwixLibrary: JNIKiwixLibrary): JNIKiwixServer =
|
fun providesJNIKiwixServer(jniKiwixLibrary: Library): JNIKiwixServer =
|
||||||
JNIKiwixServer(jniKiwixLibrary)
|
JNIKiwixServer(jniKiwixLibrary)
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
|
@ -26,7 +26,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import org.kiwix.kiwixlib.JNIKiwixException;
|
import org.kiwix.kiwixlib.JNIKiwixException;
|
||||||
import org.kiwix.kiwixlib.JNIKiwixLibrary;
|
import org.kiwix.kiwixlib.Library;
|
||||||
import org.kiwix.kiwixlib.JNIKiwixServer;
|
import org.kiwix.kiwixlib.JNIKiwixServer;
|
||||||
import org.kiwix.kiwixmobile.core.utils.ServerUtils;
|
import org.kiwix.kiwixmobile.core.utils.ServerUtils;
|
||||||
import org.kiwix.kiwixmobile.webserver.wifi_hotspot.IpAddressCallbacks;
|
import org.kiwix.kiwixmobile.webserver.wifi_hotspot.IpAddressCallbacks;
|
||||||
@ -41,12 +41,12 @@ import static org.kiwix.kiwixmobile.core.utils.ServerUtils.INVALID_IP;
|
|||||||
|
|
||||||
public class WebServerHelper {
|
public class WebServerHelper {
|
||||||
private static final String TAG = "WebServerHelper";
|
private static final String TAG = "WebServerHelper";
|
||||||
private JNIKiwixLibrary kiwixLibrary;
|
private Library kiwixLibrary;
|
||||||
private JNIKiwixServer kiwixServer;
|
private JNIKiwixServer kiwixServer;
|
||||||
private IpAddressCallbacks ipAddressCallbacks;
|
private IpAddressCallbacks ipAddressCallbacks;
|
||||||
private boolean isServerStarted;
|
private boolean isServerStarted;
|
||||||
|
|
||||||
@Inject public WebServerHelper(@NonNull JNIKiwixLibrary kiwixLibrary,
|
@Inject public WebServerHelper(@NonNull Library kiwixLibrary,
|
||||||
@NonNull JNIKiwixServer kiwixServer, @NonNull IpAddressCallbacks ipAddressCallbacks) {
|
@NonNull JNIKiwixServer kiwixServer, @NonNull IpAddressCallbacks ipAddressCallbacks) {
|
||||||
this.kiwixLibrary = kiwixLibrary;
|
this.kiwixLibrary = kiwixLibrary;
|
||||||
this.kiwixServer = kiwixServer;
|
this.kiwixServer = kiwixServer;
|
||||||
|
@ -105,7 +105,7 @@ object Versions {
|
|||||||
|
|
||||||
const val core_ktx: String = "1.1.0"
|
const val core_ktx: String = "1.1.0"
|
||||||
|
|
||||||
const val kiwixlib: String = "8.2.1"
|
const val kiwixlib: String = "9.0.1"
|
||||||
|
|
||||||
const val material: String = "1.1.0-beta02"
|
const val material: String = "1.1.0-beta02"
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ dependencies {
|
|||||||
api(Libs.kiwixlib)
|
api(Libs.kiwixlib)
|
||||||
} else {
|
} else {
|
||||||
implementation("com.getkeepsafe.relinker:relinker:1.3.1")
|
implementation("com.getkeepsafe.relinker:relinker:1.3.1")
|
||||||
implementation(fileTree(mapOf("include" to "*.aar", "dir" to "libs")))
|
api(fileTree(mapOf("include" to "*.aar", "dir" to "libs")))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Android Support
|
// Android Support
|
||||||
|
Loading…
x
Reference in New Issue
Block a user