mirror of
https://github.com/AllanWang/Frost-for-Facebook.git
synced 2024-11-08 12:02:33 +01:00
Update koin
This commit is contained in:
parent
da93672c2e
commit
f10b719447
@ -45,7 +45,9 @@ import com.raizlabs.android.dbflow.config.DatabaseConfig
|
||||
import com.raizlabs.android.dbflow.config.FlowConfig
|
||||
import com.raizlabs.android.dbflow.config.FlowManager
|
||||
import com.raizlabs.android.dbflow.runtime.ContentResolverNotifier
|
||||
import org.koin.android.ext.android.startKoin
|
||||
import org.koin.android.ext.koin.androidContext
|
||||
import org.koin.android.ext.koin.androidLogger
|
||||
import org.koin.core.context.startKoin
|
||||
import java.util.Random
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
@ -134,7 +136,12 @@ class FrostApp : Application() {
|
||||
L.d { "Activity ${activity.localClassName} created" }
|
||||
}
|
||||
})
|
||||
startKoin(this, listOf(FrostDatabase.module(this)))
|
||||
startKoin {
|
||||
if (BuildConfig.DEBUG)
|
||||
androidLogger()
|
||||
androidContext(this@FrostApp)
|
||||
modules(FrostDatabase.module(this@FrostApp))
|
||||
}
|
||||
}
|
||||
|
||||
private fun initBugsnag() {
|
||||
|
@ -21,8 +21,8 @@ import androidx.room.Database
|
||||
import androidx.room.Room
|
||||
import androidx.room.RoomDatabase
|
||||
import com.pitchedapps.frost.BuildConfig
|
||||
import org.koin.dsl.module.module
|
||||
import org.koin.standalone.StandAloneContext
|
||||
import org.koin.core.context.GlobalContext
|
||||
import org.koin.dsl.module
|
||||
|
||||
interface FrostPrivateDao {
|
||||
fun cookieDao(): CookieDao
|
||||
@ -101,6 +101,6 @@ class FrostDatabase(private val privateDb: FrostPrivateDatabase, private val pub
|
||||
* Get from koin
|
||||
* For the most part, you can retrieve directly from other koin components
|
||||
*/
|
||||
fun get(): FrostDatabase = StandAloneContext.getKoin().koinContext.get()
|
||||
fun get(): FrostDatabase = GlobalContext.get().koin.get()
|
||||
}
|
||||
}
|
||||
|
@ -47,8 +47,8 @@ import com.pitchedapps.frost.services.NotificationContent
|
||||
import com.pitchedapps.frost.services.NotificationType
|
||||
import com.pitchedapps.frost.utils.Prefs
|
||||
import com.pitchedapps.frost.utils.toReadableTime
|
||||
import org.koin.standalone.KoinComponent
|
||||
import org.koin.standalone.inject
|
||||
import org.koin.core.KoinComponent
|
||||
import org.koin.core.inject
|
||||
|
||||
class NotificationWidget : AppWidgetProvider() {
|
||||
|
||||
|
@ -17,7 +17,7 @@ APP_ID=Frost
|
||||
APP_GROUP=com.pitchedapps
|
||||
|
||||
KAU=4.0.0
|
||||
KOTLIN=1.3.21
|
||||
KOTLIN=1.3.31
|
||||
|
||||
# https://mvnrepository.com/artifact/com.android.tools.build/gradle?repo=google
|
||||
ANDROID_GRADLE=3.3.2
|
||||
@ -41,7 +41,7 @@ DBFLOW=4.2.4
|
||||
# https://github.com/brianwernick/ExoMedia/releases
|
||||
EXOMEDIA=4.3.0
|
||||
# https://github.com/InsertKoinIO/koin/blob/master/CHANGELOG.md
|
||||
KOIN=1.0.2
|
||||
KOIN=2.0.0-rc-2
|
||||
# https://github.com/mockk/mockk/releases
|
||||
MOCKK=1.9.3
|
||||
# https://mvnrepository.com/artifact/androidx.core/core-ktx?repo=google
|
||||
@ -56,10 +56,10 @@ LEAK_CANARY=1.6.2
|
||||
# https://github.com/zsmb13/MaterialDrawerKt/releases
|
||||
MATERIAL_DRAWER_KT=2.0.1
|
||||
# https://github.com/square/okhttp/releases
|
||||
OKHTTP=3.14.0
|
||||
# http://robolectric.org/getting-started/
|
||||
OKHTTP=3.14.1
|
||||
# https://developer.android.com/jetpack/androidx/releases/room
|
||||
ROOM=2.1.0-alpha04
|
||||
# http://robolectric.org/getting-started/
|
||||
ROBOELECTRIC=4.2
|
||||
# https://github.com/davemorrissey/subsampling-scale-image-view#quick-start
|
||||
SCALE_IMAGE_VIEW=3.10.0
|
||||
|
Loading…
Reference in New Issue
Block a user