This is a test if updates work
This commit is contained in:
Felitendo
2025-05-20 15:23:42 +02:00
parent e65e82c85b
commit ddff25a7c4
465 changed files with 37626 additions and 0 deletions

1
core/di/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

10
core/di/build.gradle.kts Normal file
View File

@@ -0,0 +1,10 @@
plugins {
alias(libs.plugins.looker.jvm.library)
alias(libs.plugins.looker.hilt)
alias(libs.plugins.looker.lint)
}
dependencies {
implementation(libs.kotlinx.coroutines.core)
}

View File

@@ -0,0 +1,46 @@
@file:Suppress("unused")
package com.looker.core.di
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import javax.inject.Qualifier
import javax.inject.Singleton
@Retention(AnnotationRetention.RUNTIME)
@Qualifier
annotation class IoDispatcher
@Retention(AnnotationRetention.RUNTIME)
@Qualifier
annotation class DefaultDispatcher
@Retention(AnnotationRetention.RUNTIME)
@Qualifier
annotation class ApplicationScope
@Module
@InstallIn(SingletonComponent::class)
object CoroutinesModule {
@Provides
@IoDispatcher
fun providesIODispatcher(): CoroutineDispatcher = Dispatchers.IO
@Provides
@DefaultDispatcher
fun providesDefaultDispatcher(): CoroutineDispatcher = Dispatchers.Default
@Provides
@Singleton
@ApplicationScope
fun providesCoroutineScope(
@DefaultDispatcher dispatcher: CoroutineDispatcher
): CoroutineScope = CoroutineScope(SupervisorJob() + dispatcher)
}