Commit 77470c7c authored by Viktor De Pasquale's avatar Viktor De Pasquale

Updated koin

parent f0a734fd
......@@ -74,7 +74,7 @@ dependencies {
implementation "com.github.topjohnwu.libsu:core:${libsuVersion}"
implementation "com.github.topjohnwu.libsu:io:${libsuVersion}"
def koin = "2.0.0-rc-2"
def koin = "2.0.0-GA6"
implementation "org.koin:koin-core:${koin}"
implementation "org.koin:koin-android:${koin}"
implementation "org.koin:koin-androidx-viewmodel:${koin}"
......
......@@ -3,18 +3,15 @@ package com.topjohnwu.magisk.utils
import org.koin.core.context.GlobalContext
import org.koin.core.parameter.ParametersDefinition
import org.koin.core.qualifier.Qualifier
import org.koin.core.scope.Scope
fun getKoin() = GlobalContext.get().koin
inline fun <reified T : Any> inject(
qualifier: Qualifier? = null,
scope: Scope? = null,
noinline parameters: ParametersDefinition? = null
) = lazy { get<T>(qualifier, scope, parameters) }
) = lazy { get<T>(qualifier, parameters) }
inline fun <reified T : Any> get(
qualifier: Qualifier? = null,
scope: Scope? = null,
noinline parameters: ParametersDefinition? = null
): T = getKoin().get(qualifier, scope, parameters)
\ No newline at end of file
): T = getKoin().get(qualifier, parameters)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment