Skip to content

Instantly share code, notes, and snippets.

View skywall's full-sized avatar

Lukáš Sztefek skywall

View GitHub Profile
@skywall
skywall / CoreComponent.kt
Created October 24, 2020 20:28
CoreComponent
@Singleton
@Component(
modules = [
CoreModule::class,
DatabaseModule::class,
NetworkModule::class
]
)
interface CoreComponent : DatabaseContract, NetworkContract {
@skywall
skywall / DatabaseContract.kt
Created October 24, 2020 20:14
DatabaseContract
interface DatabaseContract {
fun database(): Database
}
@skywall
skywall / DatabaseModule.kt
Last active October 24, 2020 20:11
DatabaseModule
@Module
class DatabaseModule {
@Provides
fun database(application: Application) : Database {
return Database(application)
}
}