Introduce JsonProvider.

It will ensure that classes are using the correct Json instances in the unit tests.
This commit is contained in:
Benoit Marty 2025-10-17 17:31:15 +02:00 committed by Benoit Marty
parent fa8ddba1f5
commit df48ed5a2d
21 changed files with 103 additions and 52 deletions

View file

@ -35,7 +35,6 @@ import kotlinx.coroutines.CoroutineName
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.plus
import kotlinx.serialization.json.Json
import java.io.File
@BindingContainer
@ -121,10 +120,4 @@ object AppModule {
fun providesEmojibaseProvider(@ApplicationContext context: Context): EmojibaseProvider {
return DefaultEmojibaseProvider(context)
}
@Provides
@SingleIn(AppScope::class)
fun providesJson(): Json = Json {
ignoreUnknownKeys = true
}
}