aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt11
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt6
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/widgets/NotificationWidget.kt4
-rw-r--r--gradle.properties8
4 files changed, 18 insertions, 11 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
index 41c6ff4b..0c762b41 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
@@ -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() {
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt
index 67372e23..cd5fce02 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt
@@ -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()
}
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/widgets/NotificationWidget.kt b/app/src/main/kotlin/com/pitchedapps/frost/widgets/NotificationWidget.kt
index 594da00a..66176aba 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/widgets/NotificationWidget.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/widgets/NotificationWidget.kt
@@ -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() {
diff --git a/gradle.properties b/gradle.properties
index 86e6040a..84d8a461 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -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