Remove dependency injection from core module and data module from presentation-widget module

Includes side effects:
- No longer need to restart app for user agent string change to take effect
- parseAs extension function requires a Json instance in the calling context, which doesn't necessarily need to be the default one provided by Injekt
This commit is contained in:
arkon
2023-02-20 19:02:38 -05:00
parent 10d7349506
commit 93523ef50b
34 changed files with 576 additions and 433 deletions

View File

@ -10,20 +10,14 @@ android {
defaultConfig {
consumerProguardFile("consumer-proguard.pro")
}
}
dependencies {
implementation(project(":core"))
api(kotlinx.serialization.json)
api(libs.injekt.core)
api(libs.rxjava)
api(libs.preferencektx)
api(libs.jsoup)
implementation(androidx.corektx)
}

View File

@ -68,7 +68,7 @@ abstract class HttpSource : CatalogueSource {
* Headers builder for requests. Implementations can override this method for custom headers.
*/
protected open fun headersBuilder() = Headers.Builder().apply {
add("User-Agent", network.defaultUserAgent)
add("User-Agent", network.defaultUserAgentProvider())
}
/**