Skip to content

Commit b057da8

Browse files
siddh1004renovate[bot]Siddharth Agarwal
authored
Update gradle dependencies (#5533)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Siddharth Agarwal <[email protected]>
1 parent 91a8ca5 commit b057da8

25 files changed

+131
-109
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22

33
## Next Release
44

5+
### Internal
6+
- Bump AGP to v8.12.0
7+
- Bump Lint to v31.12.0
8+
- Bump Kotlin to v2.2.0
9+
- Bump KSP to v2.2.0-2.0.2
10+
- Bump dagger to v2.57
11+
- Bump okhttp to v5.1.0
12+
- Bump retrofit to v3.0.0
13+
- Bump sqlcipher to v4.10.0
14+
- Bump AndroidX AppCompat to v1.7.1
15+
- Bump AndroidX Fragment KTX to v1.8.8
16+
- Bump asm to v9.8
17+
- Bump firebase remote config to v23.0.0
18+
- Bump Firebase Analytics KTX to v22.5.0
19+
- Bump Jackson Core to v2.19.2
20+
521
### Changes
622

723
- Update min sdk version to 26 (Android 8.0)
@@ -57,6 +73,7 @@
5773
- Bump Sentry to v8.11.0
5874
- Bump Dagger to v2.56.2
5975
- Bump Coroutines to v1.10.2
76+
- Bump AGP to v8.9.2
6077
- Skip Sentry config during app startup in the debug mode
6178
- Show spanish language option in non-production builds only
6279
- Increase lab based risk threshold to 20%

app/build.gradle.kts

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -184,19 +184,6 @@ android {
184184
beforeVariants { variant ->
185185
variant.enable = variant.name !in filteredVariants
186186
}
187-
188-
onVariants(selector().all()) { variant ->
189-
afterEvaluate {
190-
// This is a workaround for https://issuetracker.google.com/301245705 which depends on internal
191-
// implementations of the android gradle plugin and the ksp gradle plugin which might change in the future
192-
// in an unpredictable way.
193-
val variantName = variant.name.replaceFirstChar { it.titlecase() }
194-
project.tasks.getByName("ksp" + variantName + "Kotlin") {
195-
val dataBindingTask = project.tasks.getByName("dataBindingGenBaseClasses$variantName") as DataBindingGenBaseClassesTask
196-
(this as AbstractKotlinCompileTool<*>).setSource(dataBindingTask.sourceOutFolder)
197-
}
198-
}
199-
}
200187
}
201188

202189
lint {
@@ -216,7 +203,10 @@ android {
216203

217204
kotlinOptions {
218205
jvmTarget = JavaVersion.VERSION_17.toString()
219-
freeCompilerArgs = freeCompilerArgs + listOf("-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi")
206+
freeCompilerArgs = freeCompilerArgs + listOf(
207+
"-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
208+
"-Xannotation-default-target=param-property"
209+
)
220210
}
221211

222212
sourceSets {

app/lint.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555

5656
<issue id="ParcelCreator" severity="informational" />
5757
<issue id="GradleDependency" severity="informational" />
58+
<issue id="NewerVersionAvailable" severity="informational" />
5859
<issue id="PluralsCandidate" severity="informational" />
5960
<issue id="CannotEnableHidden" severity="informational" />
6061

app/src/main/java/org/simple/clinic/appupdate/criticalupdatedialog/CriticalAppUpdateDialog.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ package org.simple.clinic.appupdate.criticalupdatedialog
33
import android.content.ActivityNotFoundException
44
import android.content.Context
55
import android.content.Intent
6-
import android.net.Uri
76
import android.os.Bundle
87
import android.view.LayoutInflater
98
import android.view.View
109
import android.view.View.GONE
1110
import android.view.View.VISIBLE
1211
import android.view.ViewGroup
12+
import androidx.core.net.toUri
1313
import com.jakewharton.rxbinding3.view.clicks
1414
import com.spotify.mobius.functions.Consumer
1515
import io.reactivex.Observable
@@ -148,7 +148,7 @@ class CriticalAppUpdateDialog : BaseDialog<
148148

149149
override fun openContactUrl(url: String) {
150150
val packageManager = requireContext().packageManager
151-
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
151+
val intent = Intent(Intent.ACTION_VIEW, url.toUri())
152152

153153
if (intent.resolveActivity(packageManager) != null) {
154154
requireContext().startActivity(intent)
@@ -159,7 +159,7 @@ class CriticalAppUpdateDialog : BaseDialog<
159159

160160
override fun openSimpleInGooglePlay() {
161161
val packageManager = requireContext().packageManager
162-
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(PLAY_STORE_URL_FOR_SIMPLE))
162+
val intent = Intent(Intent.ACTION_VIEW, PLAY_STORE_URL_FOR_SIMPLE.toUri())
163163

164164
if (intent.resolveActivity(packageManager) != null) {
165165
requireContext().startActivity(intent)

app/src/main/java/org/simple/clinic/appupdate/dialog/AppUpdateDialog.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ package org.simple.clinic.appupdate.dialog
33
import android.app.Dialog
44
import android.content.Intent
55
import android.content.Intent.ACTION_VIEW
6-
import android.net.Uri
76
import android.os.Bundle
7+
import androidx.core.net.toUri
88
import androidx.fragment.app.DialogFragment
99
import androidx.fragment.app.FragmentManager
1010
import com.google.android.material.dialog.MaterialAlertDialogBuilder
11-
import org.simple.clinic.BuildConfig
1211
import org.simple.clinic.PLAY_STORE_URL_FOR_SIMPLE
1312
import org.simple.clinic.R
1413

@@ -40,7 +39,7 @@ class AppUpdateDialog : DialogFragment() {
4039

4140
private fun launchPlayStoreForUpdate() {
4241
val intent = Intent(ACTION_VIEW).apply {
43-
data = Uri.parse(PLAY_STORE_URL_FOR_SIMPLE)
42+
data = PLAY_STORE_URL_FOR_SIMPLE.toUri()
4443
}
4544
startActivity(intent)
4645
}

app/src/main/java/org/simple/clinic/facilitypicker/FacilityPickerView.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import android.os.Parcelable
66
import android.util.AttributeSet
77
import android.view.LayoutInflater
88
import android.widget.FrameLayout
9-
import android.widget.RelativeLayout
9+
import androidx.core.content.withStyledAttributes
1010
import androidx.recyclerview.widget.LinearLayoutManager
1111
import com.jakewharton.rxbinding3.recyclerview.scrollEvents
1212
import com.jakewharton.rxbinding3.recyclerview.scrollStateChanges
@@ -65,7 +65,7 @@ class FacilityPickerView(
6565
)
6666
)
6767

68-
private val pickFrom: PickFrom
68+
private lateinit var pickFrom: PickFrom
6969

7070
private var binding: ViewFacilitypickerBinding? = null
7171

@@ -88,9 +88,9 @@ class FacilityPickerView(
8888
val layoutInflater = LayoutInflater.from(context)
8989
binding = ViewFacilitypickerBinding.inflate(layoutInflater, this)
9090

91-
val typedArray = context.obtainStyledAttributes(attributeSet, R.styleable.FacilityPickerView)
92-
pickFrom = PickFrom.forAttribute(typedArray)
93-
typedArray.recycle()
91+
context.withStyledAttributes(attributeSet, R.styleable.FacilityPickerView) {
92+
pickFrom = PickFrom.forAttribute(this)
93+
}
9494

9595
context.injector<Injector>().inject(this)
9696

@@ -151,11 +151,11 @@ class FacilityPickerView(
151151
}
152152

153153
override fun showProgressIndicator() {
154-
progressIndicator.visibility = RelativeLayout.VISIBLE
154+
progressIndicator.visibility = VISIBLE
155155
}
156156

157157
override fun hideProgressIndicator() {
158-
progressIndicator.visibility = RelativeLayout.GONE
158+
progressIndicator.visibility = GONE
159159
}
160160

161161
override fun updateFacilities(facilityItems: List<FacilityListItem>) {

app/src/main/java/org/simple/clinic/home/patients/PatientsTabScreen.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ package org.simple.clinic.home.patients
33
import android.content.ActivityNotFoundException
44
import android.content.Context
55
import android.content.Intent
6-
import android.net.Uri
76
import android.os.Bundle
87
import android.view.LayoutInflater
98
import android.view.View
109
import android.view.ViewGroup
1110
import android.view.animation.AnimationUtils
1211
import androidx.annotation.IdRes
1312
import androidx.appcompat.app.AppCompatActivity
13+
import androidx.core.net.toUri
1414
import androidx.interpolator.view.animation.FastOutSlowInInterpolator
1515
import com.google.android.material.dialog.MaterialAlertDialogBuilder
1616
import com.jakewharton.rxbinding3.view.clicks
@@ -336,7 +336,7 @@ class PatientsTabScreen : BaseScreen<
336336

337337
override fun openSimpleOnPlaystore() {
338338
val packageManager = requireContext().packageManager
339-
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(PLAY_STORE_URL_FOR_SIMPLE))
339+
val intent = Intent(Intent.ACTION_VIEW, PLAY_STORE_URL_FOR_SIMPLE.toUri())
340340

341341
if (intent.resolveActivity(packageManager) != null) {
342342
requireContext().startActivity(intent)

app/src/main/java/org/simple/clinic/introvideoscreen/IntroVideoScreen.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ package org.simple.clinic.introvideoscreen
33
import android.content.ActivityNotFoundException
44
import android.content.Context
55
import android.content.Intent
6-
import android.net.Uri
76
import android.os.Bundle
87
import android.view.LayoutInflater
98
import android.view.View
109
import android.view.ViewGroup
10+
import androidx.core.net.toUri
1111
import com.jakewharton.rxbinding3.view.clicks
1212
import com.spotify.mobius.functions.Consumer
1313
import io.reactivex.Observable
@@ -96,7 +96,7 @@ class IntroVideoScreen : BaseScreen<
9696

9797
private fun openYoutubeLinkForSimpleVideo() {
9898
val packageManager = requireContext().packageManager
99-
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(simpleVideo.url))
99+
val intent = Intent(Intent.ACTION_VIEW, simpleVideo.url.toUri())
100100

101101
if (intent.resolveActivity(packageManager) != null) {
102102
requireContext().startActivity(intent)

app/src/main/java/org/simple/clinic/monthlyreports/form/compose/util/ColorUtil.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ package org.simple.clinic.monthlyreports.form.compose.util
33
import androidx.compose.runtime.Composable
44
import androidx.compose.ui.graphics.Color
55
import androidx.compose.ui.res.colorResource
6+
import androidx.core.graphics.toColorInt
67
import org.simple.clinic.R
78

89
@Composable
910
fun getColor(colorString: String): Color {
1011
return try {
11-
Color(android.graphics.Color.parseColor(colorString))
12+
Color(colorString.toColorInt())
1213
} catch (_: Throwable) {
1314
colorResource(id = R.color.simple_dark_grey)
1415
}

app/src/main/java/org/simple/clinic/newentry/PatientEntryScreen.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import android.widget.EditText
1313
import android.widget.RadioButton
1414
import androidx.core.text.buildSpannedString
1515
import androidx.core.text.inSpans
16+
import androidx.core.view.isVisible
1617
import androidx.interpolator.view.animation.FastOutSlowInInterpolator
1718
import androidx.transition.ChangeBounds
1819
import androidx.transition.Fade
@@ -243,7 +244,7 @@ class PatientEntryScreen : BaseScreen<
243244

244245
// FIXME This is temporally coupled to `scrollToFirstFieldWithError()`.
245246
private val allTextInputFields: List<EditText> by unsafeLazy {
246-
val ageOrDateOfBirthEditText = if (ageEditTextInputLayout.visibility == View.VISIBLE) {
247+
val ageOrDateOfBirthEditText = if (ageEditTextInputLayout.isVisible) {
247248
ageEditText
248249
} else {
249250
dateOfBirthEditText
@@ -697,7 +698,7 @@ class PatientEntryScreen : BaseScreen<
697698
val firstFieldWithError = views
698699
.filter {
699700
when {
700-
isGenderErrorView(it) -> it.visibility == View.VISIBLE
701+
isGenderErrorView(it) -> it.isVisible
701702
it is TextInputLayout -> it.error.isNullOrBlank().not()
702703
else -> throw AssertionError()
703704
}

0 commit comments

Comments
 (0)