Major code refactoring

Main goals are:
1. Ability to use mocks in unit tests instead of
having to setup mock web server as if it was an
integration test.
2. Cache Retrofit services in memory
3. Make it easier to read
4. Use OptIn where possible instead of propagating
Experimental* annotations everywhere
This commit is contained in:
Kirill Kamakin
2022-04-02 19:04:44 +05:00
parent 405d983a90
commit 7fc2887dc7
40 changed files with 533 additions and 676 deletions

View File

@@ -70,6 +70,12 @@ android {
}
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
}
}
dependencies {
// https://github.com/material-components/material-components-android
implementation "com.google.android.material:material:1.5.0"
@@ -110,7 +116,6 @@ dependencies {
implementation platform("com.squareup.okhttp3:okhttp-bom:4.9.3")
implementation "com.squareup.okhttp3:okhttp"
debugImplementation "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.2"
@@ -155,6 +160,9 @@ dependencies {
// https://mvnrepository.com/artifact/com.google.truth/truth
testImplementation "com.google.truth:truth:1.1.3"
// https://mockk.io/
testImplementation "io.mockk:mockk:1.12.3"
// https://github.com/androidbroadcast/ViewBindingPropertyDelegate/releases
implementation "com.github.kirich1409:viewbindingpropertydelegate-noreflection:1.5.6"