Provides kotlinx.datetime.Clock in wear
This commit is contained in:
parent
0c1224faf6
commit
1bed0251d2
2 changed files with 7 additions and 1 deletions
|
@ -118,6 +118,7 @@ dependencies {
|
|||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-guava:$coroutines_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$coroutines_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-datetime:$kotlinx_datetime_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
|
||||
// for old fashioned support-app version
|
||||
|
|
|
@ -3,11 +3,13 @@ package info.nightscout.androidaps.di
|
|||
import android.content.Context
|
||||
import dagger.Binds
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.androidaps.WearApp
|
||||
import info.nightscout.rx.di.RxModule
|
||||
import info.nightscout.shared.di.SharedModule
|
||||
import info.nightscout.shared.impl.di.SharedImplModule
|
||||
import kotlinx.datetime.Clock
|
||||
|
||||
@Suppress("unused")
|
||||
@Module(
|
||||
|
@ -27,5 +29,8 @@ open class WearModule {
|
|||
@Binds fun bindContext(aaps: WearApp): Context
|
||||
@Binds fun bindInjector(aaps: WearApp): HasAndroidInjector
|
||||
}
|
||||
|
||||
@Provides
|
||||
fun providesClock(): Clock = Clock.System
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue