Skip to content

Commit

Permalink
Merge pull request #1601 from minvws/chore/maintenance-october-2
Browse files Browse the repository at this point in the history
Chore/maintenance october 2
  • Loading branch information
ktiniatros authored Nov 7, 2023
2 parents 3d5cade + 7da2867 commit 224b766
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 27 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ allprojects {

project.plugins.withId("com.android.base") {
android {
compileSdkVersion 33
compileSdkVersion 34
defaultConfig {
minSdkVersion 23
targetSdkVersion 33
targetSdkVersion 34
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
38 changes: 19 additions & 19 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@
agp = "8.1.1"
androidx-appcompat = "1.6.1"
androidx-arch-core = "2.2.0"
androidx-camera = "1.3.0-alpha04"
androidx-core = "1.9.0"
androidx-fragment = "1.5.5"
androidx-lifecycle = "2.5.1"
androidx-navigation = "2.5.3"
androidx-camera = "1.3.0"
androidx-core = "1.12.0"
androidx-fragment = "1.6.2"
androidx-lifecycle = "2.6.2"
androidx-navigation = "2.7.5"
androidx-orchestrator = "1.4.2"
androidx-preference = "1.2.0"
androidx-room = "2.5.0"
androidx-preference = "1.2.1"
androidx-room = "2.6.0"
androidx-test = "1.5.0"
androidx-work = "2.8.1"
bouncycastle = "1.72"
certificatetransparency = "1.1.1"
coroutines = "1.6.4"
coroutines = "1.7.3"
groupie = "2.9.0"
koin = "3.2.2"
koin = "3.5.0"
# @pin update Kotlin manually
kotlin = "1.8.10"
kotlin = "1.9.20"
mockk = "1.13.4"
moshi = "1.14.0"
retrofit = "2.9.0"
uiautomator = "2.2.0"

[libraries]
androidx-browser = "androidx.browser:browser:1.5.0"
androidx-browser = "androidx.browser:browser:1.6.0"
androidx-core = { module = "androidx.core:core-ktx", version.ref = "androidx-core" }
androidx-core-testing = { module = "androidx.arch.core:core-testing", version.ref = "androidx-arch-core" }
androidx-preference = { module = "androidx.preference:preference-ktx", version.ref = "androidx-preference" }
androidx-security-crypto = "androidx.security:security-crypto:1.0.0"
androidx-test-core = { module = "androidx.test:core-ktx", version.ref = "androidx-test" }
androidx-test-junit = "androidx.test.ext:junit-ktx:1.1.5"
androidx-test-monitor = "androidx.test:monitor:1.6.0"
androidx-test-monitor = "androidx.test:monitor:1.6.1"
androidx-test-orchestrator = { module = "androidx.test:orchestrator", version.ref = "androidx-orchestrator" }
androidx-test-rules = { module = "androidx.test:rules", version.ref = "androidx-test" }
androidx-test-runner = "androidx.test:runner:1.5.2"
Expand All @@ -47,8 +47,8 @@ certificatetransparency-android = { module = "com.appmattus.certificatetranspare
constraintlayout = "androidx.constraintlayout:constraintlayout:2.1.4"
coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
crashlytics = "com.google.firebase:firebase-crashlytics-ktx:18.3.5"
desugar = "com.android.tools:desugar_jdk_libs:2.0.2"
crashlytics = "com.google.firebase:firebase-crashlytics-ktx:18.5.1"
desugar = "com.android.tools:desugar_jdk_libs:2.0.4"
espresso-core = "androidx.test.espresso:espresso-core:3.5.1"
fragment = { module = "androidx.fragment:fragment-ktx", version.ref = "androidx-fragment" }
fragment-testing = { module = "androidx.fragment:fragment-testing", version.ref = "androidx-fragment" }
Expand All @@ -60,8 +60,8 @@ koin-test-junit4 = { module = "io.insert-koin:koin-test-junit4", version.ref = "
lifecycle-livedata = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "androidx-lifecycle" }
lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle" }
lottie = "com.airbnb.android:lottie:6.0.0"
material = "com.google.android.material:material:1.8.0"
mlkit-barcode = "com.google.android.gms:play-services-mlkit-barcode-scanning:18.1.0"
material = "com.google.android.material:material:1.10.0"
mlkit-barcode = "com.google.android.gms:play-services-mlkit-barcode-scanning:18.3.0"
mockk = { module = "io.mockk:mockk", version.ref = "mockk" }
mockk-android = { module = "io.mockk:mockk-android", version.ref = "mockk" }
moshi-adapters = { module = "com.squareup.moshi:moshi-adapters", version.ref = "moshi" }
Expand All @@ -78,7 +78,7 @@ okhttp-tls = { module = "com.squareup.okhttp3:okhttp-tls" }
openid-appauth = "net.openid:appauth:0.11.1"
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
retrofit-moshi = { module = "com.squareup.retrofit2:converter-moshi", version.ref = "retrofit" }
robolectric = "org.robolectric:robolectric:4.9.2"
robolectric = "org.robolectric:robolectric:4.10.3"
room = { module = "androidx.room:room-ktx", version.ref = "androidx-room" }
room-compiler = { module = "androidx.room:room-compiler", version.ref = "androidx-room" }
room-runtime = { module = "androidx.room:room-runtime", version.ref = "androidx-room" }
Expand All @@ -90,7 +90,7 @@ uiautomator = { module = "androidx.test.uiautomator:uiautomator", version.ref =
viewpager2 = "androidx.viewpager2:viewpager2:1.0.0"
work-runtime = { module = "androidx.work:work-runtime-ktx", version.ref = "androidx-work" }
work-testing = { module = "androidx.work:work-testing", version.ref = "androidx-work" }
zxing-core = "com.google.zxing:core:3.5.1"
zxing-core = "com.google.zxing:core:3.5.2"

[bundles]
groupie = [
Expand All @@ -106,7 +106,7 @@ googleServices = "com.google.gms.google-services:4.3.15"
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
# @pin dependent on Kotlin version
ksp = "com.google.devtools.ksp:1.8.10-1.0.9"
ksp = "com.google.devtools.ksp:1.9.20-1.0.14"
navigation-safeargs-kotlin = { id = "androidx.navigation.safeargs.kotlin", version.ref = "androidx-navigation" }
shot = "shot:6.0.0"
spotless = "com.diffplug.spotless:5.10.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fun <T> LiveData<T>.getOrAwaitValue(
var data: T? = null
val latch = CountDownLatch(1)
val observer = object : Observer<T> {
override fun onChanged(o: T?) {
override fun onChanged(o: T) {
data = o
latch.countDown()
this@getOrAwaitValue.removeObserver(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ data class Event<out T>(private val content: T) {
* [onEventUnhandledContent] is *only* called if the [Event]'s contents has not been handled.
*/
class EventObserver<T>(private val onEventUnhandledContent: (T) -> Unit) : Observer<Event<T>> {
override fun onChanged(event: Event<T>?) {
event?.getContentIfNotHandled()?.let { value ->
onEventUnhandledContent(value)

override fun onChanged(value: Event<T>) {
value.getContentIfNotHandled()?.let {
onEventUnhandledContent(it)
}
}
}
8 changes: 7 additions & 1 deletion spotless.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ apply plugin: "com.diffplug.spotless"

spotless {
kotlin {
target '**/*.kt'
target 'api/*.kt'
target 'appconfig/*.kt'
target 'design/*.kt'
target 'holder/*.kt'
target 'introduction/*.kt'
target 'qrscanner/*.kt'
target 'shared/*.kt'
ktlint()
trimTrailingWhitespace()
indentWithSpaces()
Expand Down

0 comments on commit 224b766

Please sign in to comment.