Merge pull request #23 from kirmanak/dependencies

Update versions of dependencies
This commit is contained in:
Kirill Kamakin
2021-12-27 12:27:51 +03:00
committed by GitHub
4 changed files with 23 additions and 16 deletions

View File

@@ -106,14 +106,14 @@ dependencies {
// https://github.com/JakeWharton/retrofit2-kotlinx-serialization-converter/tags
implementation "com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:0.8.0"
// https://search.maven.org/artifact/com.squareup.okhttp3/okhttp
def okhttp_version = "4.9.2"
implementation "com.squareup.okhttp3:okhttp:$okhttp_version"
implementation "com.squareup.okhttp3:logging-interceptor:$okhttp_version"
testImplementation "com.squareup.okhttp3:mockwebserver:$okhttp_version"
// https://github.com/square/okhttp/tags
implementation platform("com.squareup.okhttp3:okhttp-bom:4.9.3")
implementation "com.squareup.okhttp3:okhttp"
implementation "com.squareup.okhttp3:logging-interceptor"
testImplementation "com.squareup.okhttp3:mockwebserver"
// https://github.com/Kotlin/kotlinx.serialization/releases
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.1"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2"
// https://developer.android.com/jetpack/androidx/releases/preference
implementation "androidx.preference:preference-ktx:1.1.1"
@@ -127,7 +127,7 @@ dependencies {
testImplementation "androidx.paging:paging-common-ktx:$paging_version"
// https://developer.android.com/jetpack/androidx/releases/room
def room_version = "2.4.0-beta02"
def room_version = "2.4.0"
implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-ktx:$room_version"
implementation "androidx.room:room-paging:$room_version"
@@ -144,10 +144,10 @@ dependencies {
testImplementation "junit:junit:4.13.2"
// https://github.com/Kotlin/kotlinx.coroutines/releases
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.2"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.0"
// https://github.com/robolectric/robolectric/releases
testImplementation "org.robolectric:robolectric:4.7.1"
testImplementation "org.robolectric:robolectric:4.7.3"
// https://developer.android.com/jetpack/androidx/releases/test
testImplementation "androidx.test.ext:junit-ktx:1.1.3"

View File

@@ -41,3 +41,10 @@
}
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault
### kotlinx.serialization https://github.com/Kotlin/kotlinx.serialization#android ###
### OkHttp warnings https://github.com/square/okhttp/issues/6258 ###
-dontwarn okhttp3.internal.platform.**
-dontwarn org.conscrypt.**
-dontwarn org.bouncycastle.**
-dontwarn org.openjsse.**
### OkHttp warnings ###

View File

@@ -5,9 +5,9 @@ import dagger.hilt.android.testing.HiltAndroidTest
import gq.kirmanak.mealient.data.disclaimer.DisclaimerStorage
import gq.kirmanak.mealient.test.HiltRobolectricTest
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.take
import kotlinx.coroutines.test.runBlockingTest
import kotlinx.coroutines.test.currentTime
import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Test
import java.util.concurrent.TimeUnit
@@ -27,14 +27,14 @@ class DisclaimerViewModelTest : HiltRobolectricTest() {
}
@Test
fun `when tickerFlow 3 seconds then sends count every 3 seconds`() = runBlockingTest() {
fun `when tickerFlow 3 seconds then sends count every 3 seconds`() = runTest {
subject.tickerFlow(3, TimeUnit.SECONDS).take(10).collect {
assertThat(it * 3000).isEqualTo(currentTime)
}
}
@Test
fun `when tickerFlow 500 ms then sends count every 500 ms`() = runBlockingTest() {
fun `when tickerFlow 500 ms then sends count every 500 ms`() = runTest {
subject.tickerFlow(500, TimeUnit.MILLISECONDS).take(10).collect {
assertThat(it * 500).isEqualTo(currentTime)
}

View File

@@ -1,10 +1,10 @@
buildscript {
ext {
// https://developer.android.com/jetpack/androidx/releases/navigation
nav_version = "2.4.0-beta02"
nav_version = "2.4.0-rc01"
// https://dagger.dev/hilt/gradle-setup
hilt_version = "2.40.1"
hilt_version = "2.40.5"
// https://kotlinlang.org/docs/gradle.html
kotlin_version = "1.6.0"
@@ -17,7 +17,7 @@ buildscript {
dependencies {
// https://maven.google.com/web/index.html?q=com.android.tools.build#com.android.tools.build:gradle
classpath "com.android.tools.build:gradle:7.0.3"
classpath "com.android.tools.build:gradle:7.0.4"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"