mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-08 23:07:26 -04:00
Upgraded many dependencies of our project.
* Upgraded test cases and project dependencies. * Refactor test cases and project code according to the new changes in dependencies.
This commit is contained in:
parent
98671f17d4
commit
f2e44e02c4
@ -46,7 +46,7 @@ class LocalFileTransferTest {
|
|||||||
@JvmField
|
@JvmField
|
||||||
var retryRule = RetryRule()
|
var retryRule = RetryRule()
|
||||||
|
|
||||||
private var context: Context? = null
|
private lateinit var context: Context
|
||||||
private lateinit var activityScenario: ActivityScenario<KiwixMainActivity>
|
private lateinit var activityScenario: ActivityScenario<KiwixMainActivity>
|
||||||
|
|
||||||
private val permissions = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
private val permissions = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
|
@ -67,7 +67,7 @@ class KiwixSplashActivityTest {
|
|||||||
@JvmField
|
@JvmField
|
||||||
var permissionRules: GrantPermissionRule =
|
var permissionRules: GrantPermissionRule =
|
||||||
GrantPermissionRule.grant(*permissions)
|
GrantPermissionRule.grant(*permissions)
|
||||||
private var context: Context? = null
|
private lateinit var context: Context
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
fun setUp() {
|
fun setUp() {
|
||||||
|
@ -23,7 +23,7 @@ dependencies {
|
|||||||
}
|
}
|
||||||
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.20.0")
|
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.20.0")
|
||||||
implementation("com.googlecode.json-simple:json-simple:1.1")
|
implementation("com.googlecode.json-simple:json-simple:1.1")
|
||||||
implementation("com.squareup.okhttp3:okhttp:4.9.0")
|
implementation("com.squareup.okhttp3:okhttp:4.10.0")
|
||||||
|
|
||||||
implementation(gradleApi())
|
implementation(gradleApi())
|
||||||
implementation(localGroovy())
|
implementation(localGroovy())
|
||||||
|
@ -20,7 +20,7 @@ object Versions {
|
|||||||
|
|
||||||
const val com_squareup_retrofit2: String = "2.9.0"
|
const val com_squareup_retrofit2: String = "2.9.0"
|
||||||
|
|
||||||
const val com_squareup_okhttp3: String = "4.9.0"
|
const val com_squareup_okhttp3: String = "4.10.0"
|
||||||
|
|
||||||
const val org_jetbrains_kotlin: String = "1.7.0"
|
const val org_jetbrains_kotlin: String = "1.7.0"
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ object Versions {
|
|||||||
|
|
||||||
const val com_jakewharton: String = "10.2.3"
|
const val com_jakewharton: String = "10.2.3"
|
||||||
|
|
||||||
const val androidx_test: String = "1.5.1"
|
const val androidx_test: String = "1.5.2"
|
||||||
|
|
||||||
const val androidx_test_core: String = "1.5.0"
|
const val androidx_test_core: String = "1.5.0"
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ object Versions {
|
|||||||
|
|
||||||
const val io_objectbox: String = "3.5.0"
|
const val io_objectbox: String = "3.5.0"
|
||||||
|
|
||||||
const val io_mockk: String = "1.13.5"
|
const val io_mockk: String = "1.13.7"
|
||||||
|
|
||||||
const val android_arch_lifecycle_extensions: String = "1.1.1"
|
const val android_arch_lifecycle_extensions: String = "1.1.1"
|
||||||
|
|
||||||
@ -52,25 +52,25 @@ object Versions {
|
|||||||
|
|
||||||
const val javax_annotation_api: String = "1.3.2"
|
const val javax_annotation_api: String = "1.3.2"
|
||||||
|
|
||||||
const val leakcanary_android: String = "2.9.1"
|
const val leakcanary_android: String = "2.13"
|
||||||
|
|
||||||
const val constraintlayout: String = "2.0.4"
|
const val constraintlayout: String = "2.1.4"
|
||||||
|
|
||||||
const val swipe_refresh_layout: String = "1.1.0"
|
const val swipe_refresh_layout: String = "1.1.0"
|
||||||
|
|
||||||
const val collection_ktx: String = "1.1.0"
|
const val collection_ktx: String = "1.1.0"
|
||||||
|
|
||||||
const val preference_ktx: String = "1.1.1"
|
const val preference_ktx: String = "1.2.0"
|
||||||
|
|
||||||
const val junit_jupiter: String = "5.9.1"
|
const val junit_jupiter: String = "5.10.2"
|
||||||
|
|
||||||
const val assertj_core: String = "3.18.1"
|
const val assertj_core: String = "3.25.3"
|
||||||
|
|
||||||
const val core_testing: String = "2.1.0"
|
const val core_testing: String = "2.2.0"
|
||||||
|
|
||||||
const val fragment_ktx: String = "1.2.5"
|
const val fragment_ktx: String = "1.2.5"
|
||||||
|
|
||||||
const val testing_ktx: String = "1.2.0"
|
const val testing_ktx: String = "1.3.0"
|
||||||
|
|
||||||
const val threetenabp: String = "1.3.0"
|
const val threetenabp: String = "1.3.0"
|
||||||
|
|
||||||
@ -80,15 +80,15 @@ object Versions {
|
|||||||
|
|
||||||
const val simple_xml: String = "2.7.1"
|
const val simple_xml: String = "2.7.1"
|
||||||
|
|
||||||
const val appcompat: String = "1.2.0"
|
const val appcompat: String = "1.6.1"
|
||||||
|
|
||||||
const val rxandroid: String = "2.1.1"
|
const val rxandroid: String = "2.1.1"
|
||||||
|
|
||||||
const val core_ktx: String = "1.3.2"
|
const val core_ktx: String = "1.9.0"
|
||||||
|
|
||||||
const val libkiwix: String = "2.0.0"
|
const val libkiwix: String = "2.0.0"
|
||||||
|
|
||||||
const val material: String = "1.2.1"
|
const val material: String = "1.8.0"
|
||||||
|
|
||||||
const val multidex: String = "2.0.1"
|
const val multidex: String = "2.0.1"
|
||||||
|
|
||||||
@ -96,11 +96,11 @@ object Versions {
|
|||||||
|
|
||||||
const val fetch: String = "3.1.6"
|
const val fetch: String = "3.1.6"
|
||||||
|
|
||||||
const val rxjava: String = "2.2.20"
|
const val rxjava: String = "2.2.21"
|
||||||
|
|
||||||
const val webkit: String = "1.7.0"
|
const val webkit: String = "1.7.0"
|
||||||
|
|
||||||
const val junit: String = "1.1.4"
|
const val junit: String = "1.1.5"
|
||||||
|
|
||||||
const val material_show_case_view: String = "1.3.7"
|
const val material_show_case_view: String = "1.3.7"
|
||||||
}
|
}
|
||||||
|
@ -120,13 +120,13 @@ abstract class CorePrefsFragment :
|
|||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
preferenceScreen.sharedPreferences
|
preferenceScreen.sharedPreferences
|
||||||
.registerOnSharedPreferenceChangeListener(this)
|
?.registerOnSharedPreferenceChangeListener(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
super.onPause()
|
super.onPause()
|
||||||
preferenceScreen.sharedPreferences
|
preferenceScreen.sharedPreferences
|
||||||
.unregisterOnSharedPreferenceChangeListener(this)
|
?.unregisterOnSharedPreferenceChangeListener(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
|
@ -126,7 +126,7 @@
|
|||||||
android:background="?colorOnSurface"
|
android:background="?colorOnSurface"
|
||||||
android:contentDescription="@string/menu_exit_full_screen"
|
android:contentDescription="@string/menu_exit_full_screen"
|
||||||
android:src="@drawable/fullscreen_exit"
|
android:src="@drawable/fullscreen_exit"
|
||||||
android:tint="?colorSurface"
|
app:tint="?colorSurface"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:minWidth="@dimen/material_minimum_height_and_width"
|
android:minWidth="@dimen/material_minimum_height_and_width"
|
||||||
android:minHeight="@dimen/material_minimum_height_and_width"
|
android:minHeight="@dimen/material_minimum_height_and_width"
|
||||||
|
@ -290,7 +290,7 @@ class TestObserver<T>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun assertValue(value: (T) -> Boolean): TestObserver<T> {
|
fun assertValue(value: (T) -> Boolean): TestObserver<T> {
|
||||||
assertThat(values.last()).satisfies { value(it) }
|
assertThat(values.last()).satisfies({ value(it) })
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.kiwix.kiwixmobile.custom.settings
|
package org.kiwix.kiwixmobile.custom.settings
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import androidx.preference.Preference
|
||||||
import org.kiwix.kiwixmobile.core.settings.CorePrefsFragment
|
import org.kiwix.kiwixmobile.core.settings.CorePrefsFragment
|
||||||
import org.kiwix.kiwixmobile.core.utils.SharedPreferenceUtil.Companion.PREF_LANG
|
import org.kiwix.kiwixmobile.core.utils.SharedPreferenceUtil.Companion.PREF_LANG
|
||||||
import org.kiwix.kiwixmobile.core.utils.SharedPreferenceUtil.Companion.PREF_WIFI_ONLY
|
import org.kiwix.kiwixmobile.core.utils.SharedPreferenceUtil.Companion.PREF_WIFI_ONLY
|
||||||
@ -33,7 +34,7 @@ class CustomPrefsFragment : CorePrefsFragment() {
|
|||||||
if (BuildConfig.ENFORCED_LANG.isEmpty()) {
|
if (BuildConfig.ENFORCED_LANG.isEmpty()) {
|
||||||
setUpLanguageChooser(PREF_LANG)
|
setUpLanguageChooser(PREF_LANG)
|
||||||
} else {
|
} else {
|
||||||
preferenceScreen.removePreference(findPreference("pref_language"))
|
findPreference<Preference>("pref_language")?.let(preferenceScreen::removePreference)
|
||||||
}
|
}
|
||||||
preferenceScreen.removePreferenceRecursively(PREF_WIFI_ONLY)
|
preferenceScreen.removePreferenceRecursively(PREF_WIFI_ONLY)
|
||||||
}
|
}
|
||||||
@ -50,6 +51,6 @@ class CustomPrefsFragment : CorePrefsFragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun setStorage() {
|
override fun setStorage() {
|
||||||
preferenceScreen.removePreference(findPreference("pref_storage"))
|
findPreference<Preference>("pref_storage")?.let(preferenceScreen::removePreference)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user