From f90bed24921646e02754139df0918577d3cccc35 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 10 Jan 2021 17:17:41 -0800 Subject: [PATCH] Fix koin imports --- app/build.gradle | 6 +++++- .../kotlin/com/pitchedapps/frost/FrostTestApp.kt | 4 ++-- app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt | 4 ++-- .../main/kotlin/com/pitchedapps/frost/glide/GlideUtils.kt | 4 ++-- .../kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt | 4 ++-- .../com/pitchedapps/frost/iitems/NotificationIItem.kt | 4 ++-- .../main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt | 4 ++-- .../com/pitchedapps/frost/prefs/sections/BehaviourPrefs.kt | 4 ++-- .../com/pitchedapps/frost/prefs/sections/CorePrefs.kt | 4 ++-- .../com/pitchedapps/frost/prefs/sections/FeedPrefs.kt | 4 ++-- .../com/pitchedapps/frost/prefs/sections/NotifPrefs.kt | 4 ++-- .../com/pitchedapps/frost/prefs/sections/ThemePrefs.kt | 4 ++-- .../kotlin/com/pitchedapps/frost/services/UpdateReceiver.kt | 4 ++-- .../main/kotlin/com/pitchedapps/frost/views/AccountItem.kt | 4 ++-- .../main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt | 4 ++-- .../kotlin/com/pitchedapps/frost/views/FrostContentView.kt | 4 ++-- .../kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt | 4 ++-- .../kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt | 4 ++-- .../kotlin/com/pitchedapps/frost/views/FrostViewPager.kt | 4 ++-- .../main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt | 4 ++-- app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt | 4 ++-- .../main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt | 4 ++-- .../main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt | 4 ++-- .../com/pitchedapps/frost/widgets/NotificationWidget.kt | 4 ++-- 24 files changed, 51 insertions(+), 47 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 5375ac455..47ed102f2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -124,7 +124,11 @@ android { } - def compilerArgs = ["-Xuse-experimental=kotlin.Experimental" /*, "-XXLanguage:+InlineClasses"*/] + def compilerArgs = [ + "-Xuse-experimental=kotlin.Experimental", + // "-XXLanguage:+InlineClasses", + "-Xopt-in=kotlin.RequiresOptIn", + ] buildTypes { debug { diff --git a/app/src/androidTest/kotlin/com/pitchedapps/frost/FrostTestApp.kt b/app/src/androidTest/kotlin/com/pitchedapps/frost/FrostTestApp.kt index b52b33359..5d560b2a7 100644 --- a/app/src/androidTest/kotlin/com/pitchedapps/frost/FrostTestApp.kt +++ b/app/src/androidTest/kotlin/com/pitchedapps/frost/FrostTestApp.kt @@ -29,9 +29,9 @@ import org.junit.runner.Description import org.junit.runners.model.Statement import org.koin.android.ext.koin.androidContext import org.koin.android.ext.koin.androidLogger -import org.koin.core.KoinComponent +import org.koin.core.component.KoinComponent import org.koin.core.context.startKoin -import org.koin.core.get +import org.koin.core.component.get import org.koin.core.module.Module import org.koin.dsl.module diff --git a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt index 38d0dd5c7..7b3eda0e9 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt @@ -37,9 +37,9 @@ import com.pitchedapps.frost.utils.L import java.util.Random import org.koin.android.ext.koin.androidContext import org.koin.android.ext.koin.androidLogger -import org.koin.core.KoinComponent +import org.koin.core.component.KoinComponent import org.koin.core.context.startKoin -import org.koin.core.get +import org.koin.core.component.get import org.koin.core.module.Module import org.koin.dsl.module diff --git a/app/src/main/kotlin/com/pitchedapps/frost/glide/GlideUtils.kt b/app/src/main/kotlin/com/pitchedapps/frost/glide/GlideUtils.kt index 1ae46c159..7d9694fea 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/glide/GlideUtils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/glide/GlideUtils.kt @@ -30,8 +30,8 @@ import com.pitchedapps.frost.facebook.FbCookie import okhttp3.Interceptor import okhttp3.OkHttpClient import okhttp3.Response -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject /** * Created by Allan Wang on 28/12/17. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt b/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt index d8d30aefb..47a362b4d 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt @@ -30,8 +30,8 @@ import com.pitchedapps.frost.R import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.launchWebOverlay -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject /** * Created by Allan Wang on 30/12/17. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt index b13102f74..56e27ccd4 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt @@ -39,8 +39,8 @@ import com.pitchedapps.frost.glide.GlideApp import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.isIndependent import com.pitchedapps.frost.utils.launchWebOverlay -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject /** * Created by Allan Wang on 27/12/17. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt index e519aee46..6f278fe27 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt @@ -30,8 +30,8 @@ import com.mikepenz.fastadapter.drag.IDraggable import com.pitchedapps.frost.R import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.prefs.Prefs -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject /** * Created by Allan Wang on 26/11/17. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/BehaviourPrefs.kt b/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/BehaviourPrefs.kt index f023d4afd..9d6210484 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/BehaviourPrefs.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/BehaviourPrefs.kt @@ -21,8 +21,8 @@ import ca.allanwang.kau.kpref.KPrefFactory import com.pitchedapps.frost.BuildConfig import com.pitchedapps.frost.prefs.OldPrefs import com.pitchedapps.frost.prefs.PrefsBase -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject interface BehaviourPrefs : PrefsBase { var biometricsEnabled: Boolean diff --git a/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/CorePrefs.kt b/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/CorePrefs.kt index d1609d73e..b7041f75a 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/CorePrefs.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/CorePrefs.kt @@ -21,8 +21,8 @@ import ca.allanwang.kau.kpref.KPrefFactory import com.pitchedapps.frost.BuildConfig import com.pitchedapps.frost.prefs.OldPrefs import com.pitchedapps.frost.prefs.PrefsBase -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject interface CorePrefs : PrefsBase { var lastLaunch: Long diff --git a/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/FeedPrefs.kt b/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/FeedPrefs.kt index 232a5ca38..3fe2cfd8e 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/FeedPrefs.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/FeedPrefs.kt @@ -22,8 +22,8 @@ import com.pitchedapps.frost.BuildConfig import com.pitchedapps.frost.enums.MainActivityLayout import com.pitchedapps.frost.prefs.OldPrefs import com.pitchedapps.frost.prefs.PrefsBase -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject interface FeedPrefs : PrefsBase { var webTextScaling: Int diff --git a/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/NotifPrefs.kt b/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/NotifPrefs.kt index 5b0ba83ba..a9a6956f4 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/NotifPrefs.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/NotifPrefs.kt @@ -21,8 +21,8 @@ import ca.allanwang.kau.kpref.KPrefFactory import com.pitchedapps.frost.BuildConfig import com.pitchedapps.frost.prefs.OldPrefs import com.pitchedapps.frost.prefs.PrefsBase -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject interface NotifPrefs : PrefsBase { var notificationKeywords: Set diff --git a/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/ThemePrefs.kt b/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/ThemePrefs.kt index 487827deb..84f64435e 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/ThemePrefs.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/ThemePrefs.kt @@ -29,8 +29,8 @@ import com.pitchedapps.frost.enums.Theme import com.pitchedapps.frost.injectors.InjectorContract import com.pitchedapps.frost.prefs.OldPrefs import com.pitchedapps.frost.prefs.PrefsBase -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject interface ThemePrefs : PrefsBase { var theme: Int diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/UpdateReceiver.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/UpdateReceiver.kt index 5506c812c..439838a96 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/services/UpdateReceiver.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/services/UpdateReceiver.kt @@ -21,8 +21,8 @@ import android.content.Context import android.content.Intent import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.L -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject /** * Created by Allan Wang on 2017-05-31. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt index b621da07c..6ba9ff4d2 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt @@ -38,8 +38,8 @@ import com.pitchedapps.frost.facebook.profilePictureUrl import com.pitchedapps.frost.glide.FrostGlide import com.pitchedapps.frost.glide.GlideApp import com.pitchedapps.frost.prefs.Prefs -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject /** * Created by Allan Wang on 2017-06-05. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt index 4b5b24c11..ed94b59f2 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt @@ -30,8 +30,8 @@ import ca.allanwang.kau.utils.withAlpha import com.mikepenz.iconics.typeface.IIcon import com.pitchedapps.frost.databinding.ViewBadgedIconBinding import com.pitchedapps.frost.prefs.Prefs -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject /** * Created by Allan Wang on 2017-06-19. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt index 7245e64e9..55f41807b 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt @@ -47,8 +47,8 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.channels.BroadcastChannel import kotlinx.coroutines.channels.ConflatedBroadcastChannel import kotlinx.coroutines.channels.ReceiveChannel -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject class FrostContentWeb @JvmOverloads constructor( context: Context, diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt index 7bdfff0c1..89009b567 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt @@ -30,8 +30,8 @@ import com.pitchedapps.frost.fragments.RecyclerContentContract import com.pitchedapps.frost.prefs.Prefs import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.launch -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject /** * Created by Allan Wang on 2017-05-29. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt index 9c10cd018..09be1184d 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt @@ -47,8 +47,8 @@ import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.L import com.pitchedapps.frost.utils.ctxCoroutine import com.pitchedapps.frost.utils.frostDownload -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject /** * Created by Allan Wang on 2017-10-13. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostViewPager.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostViewPager.kt index 41c3ad863..e3a23e12b 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostViewPager.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostViewPager.kt @@ -22,8 +22,8 @@ import android.util.AttributeSet import android.view.MotionEvent import androidx.viewpager.widget.ViewPager import com.pitchedapps.frost.prefs.Prefs -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject /** * Created by Allan Wang on 2017-07-07. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt index ad8e9c771..34bb5204f 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt @@ -45,8 +45,8 @@ import com.pitchedapps.frost.web.NestedWebView import kotlin.math.abs import kotlin.math.max import kotlin.math.min -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject /** * Created by Allan Wang on 2017-05-29. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt index b4ef2837d..0d53608b9 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt @@ -38,8 +38,8 @@ import com.mikepenz.iconics.typeface.IIcon import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.pitchedapps.frost.R import com.pitchedapps.frost.prefs.Prefs -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject /** * Created by Allan Wang on 2017-06-19. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt index 35efaeafb..17ab77a73 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt @@ -35,8 +35,8 @@ import com.pitchedapps.frost.utils.isFacebookUrl import java.io.File import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject /** * Created by Allan Wang on 2018-01-05. diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt index e111e5c36..1a081d2eb 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt @@ -42,8 +42,8 @@ import com.pitchedapps.frost.utils.L import com.pitchedapps.frost.utils.isFacebookUrl import kotlinx.coroutines.CompletableDeferred import kotlinx.coroutines.coroutineScope -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject /** * Created by Allan Wang on 2017-05-29. 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 0fdc19ae0..aef3fada9 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.prefs.Prefs import com.pitchedapps.frost.services.NotificationContent import com.pitchedapps.frost.services.NotificationType import com.pitchedapps.frost.utils.toReadableTime -import org.koin.core.KoinComponent -import org.koin.core.inject +import org.koin.core.component.KoinComponent +import org.koin.core.component.inject class NotificationWidget : AppWidgetProvider(), KoinComponent {