Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
77470c7c
Commit
77470c7c
authored
May 24, 2019
by
Viktor De Pasquale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated koin
parent
f0a734fd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
build.gradle
app/build.gradle
+1
-1
XKoin.kt
app/src/main/java/com/topjohnwu/magisk/utils/XKoin.kt
+2
-5
No files found.
app/build.gradle
View file @
77470c7c
...
...
@@ -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}"
...
...
app/src/main/java/com/topjohnwu/magisk/utils/XKoin.kt
View file @
77470c7c
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment