Skip to content

Commit

Permalink
Upgraded many dependencies of our project.
Browse files Browse the repository at this point in the history
* Upgraded test cases and project dependencies.
* Refactor test cases and project code according to the new changes in dependencies.
  • Loading branch information
MohitMaliDeveloper committed Mar 4, 2024
1 parent da051e0 commit 151f0c2
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class LocalFileTransferTest {
@JvmField
var retryRule = RetryRule()

private var context: Context? = null
private lateinit var context: Context
private lateinit var activityScenario: ActivityScenario<KiwixMainActivity>

private val permissions = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class KiwixSplashActivityTest {
@JvmField
var permissionRules: GrantPermissionRule =
GrantPermissionRule.grant(*permissions)
private var context: Context? = null
private lateinit var context: Context

@Before
fun setUp() {
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies {
}
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.20.0")
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(localGroovy())
Expand Down
30 changes: 15 additions & 15 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ object Versions {

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"

Expand All @@ -32,15 +32,15 @@ object Versions {

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_orchestrator: String = "1.4.1"

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"

Expand All @@ -52,25 +52,25 @@ object Versions {

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 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 testing_ktx: String = "1.2.0"
const val testing_ktx: String = "1.3.0"

const val threetenabp: String = "1.3.0"

Expand All @@ -80,27 +80,27 @@ object Versions {

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 core_ktx: String = "1.3.2"
const val core_ktx: String = "1.9.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 barista: String = "4.3.0"

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 junit: String = "1.1.4"
const val junit: String = "1.1.5"

const val material_show_case_view: String = "1.3.7"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ abstract class CorePrefsFragment :
override fun onResume() {
super.onResume()
preferenceScreen.sharedPreferences
.registerOnSharedPreferenceChangeListener(this)
?.registerOnSharedPreferenceChangeListener(this)
}

override fun onPause() {
super.onPause()
preferenceScreen.sharedPreferences
.unregisterOnSharedPreferenceChangeListener(this)
?.unregisterOnSharedPreferenceChangeListener(this)
}

override fun onDestroyView() {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/res/layout/reader_fragment_content.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
android:background="?colorOnSurface"
android:contentDescription="@string/menu_exit_full_screen"
android:src="@drawable/fullscreen_exit"
android:tint="?colorSurface"
app:tint="?colorSurface"
android:visibility="gone"
android:minWidth="@dimen/material_minimum_height_and_width"
android:minHeight="@dimen/material_minimum_height_and_width"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ class TestObserver<T>(
}

fun assertValue(value: (T) -> Boolean): TestObserver<T> {
assertThat(values.last()).satisfies { value(it) }
assertThat(values.last()).satisfies({ value(it) })
return this
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.kiwix.kiwixmobile.custom.settings

import android.os.Bundle
import androidx.preference.Preference
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_WIFI_ONLY
Expand All @@ -33,7 +34,7 @@ class CustomPrefsFragment : CorePrefsFragment() {
if (BuildConfig.ENFORCED_LANG.isEmpty()) {
setUpLanguageChooser(PREF_LANG)
} else {
preferenceScreen.removePreference(findPreference("pref_language"))
findPreference<Preference>("pref_language")?.let(preferenceScreen::removePreference)
}
preferenceScreen.removePreferenceRecursively(PREF_WIFI_ONLY)
}
Expand All @@ -50,6 +51,6 @@ class CustomPrefsFragment : CorePrefsFragment() {
}

override fun setStorage() {
preferenceScreen.removePreference(findPreference("pref_storage"))
findPreference<Preference>("pref_storage")?.let(preferenceScreen::removePreference)
}
}

0 comments on commit 151f0c2

Please sign in to comment.