mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-12-23 09:07:14 +00:00
commit
fa18d15c3c
@ -1,5 +1,10 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.19.0
|
||||||
|
|
||||||
|
* `Versions`:
|
||||||
|
* `Korlibs`: `4.0.1`
|
||||||
|
|
||||||
## 0.18.4
|
## 0.18.4
|
||||||
|
|
||||||
* `Koin`:
|
* `Koin`:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package dev.inmo.micro_utils.crypto
|
package dev.inmo.micro_utils.crypto
|
||||||
|
|
||||||
import com.soywiz.krypto.md5
|
import korlibs.crypto.md5
|
||||||
|
|
||||||
typealias MD5 = String
|
typealias MD5 = String
|
||||||
|
|
||||||
|
@ -14,5 +14,5 @@ crypto_js_version=4.1.1
|
|||||||
# Project data
|
# Project data
|
||||||
|
|
||||||
group=dev.inmo
|
group=dev.inmo
|
||||||
version=0.18.4
|
version=0.19.0
|
||||||
android_code_version=195
|
android_code_version=196
|
||||||
|
@ -10,7 +10,7 @@ jb-compose = "1.4.0"
|
|||||||
jb-exposed = "0.41.1"
|
jb-exposed = "0.41.1"
|
||||||
jb-dokka = "1.8.10"
|
jb-dokka = "1.8.10"
|
||||||
|
|
||||||
korlibs = "3.4.0"
|
korlibs = "4.0.1"
|
||||||
uuid = "0.7.0"
|
uuid = "0.7.0"
|
||||||
|
|
||||||
ktor = "2.3.0"
|
ktor = "2.3.0"
|
||||||
|
40
koin/src/commonMain/kotlin/GetWithDefinition.kt
Normal file
40
koin/src/commonMain/kotlin/GetWithDefinition.kt
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
package dev.inmo.micro_utils.koin
|
||||||
|
|
||||||
|
import org.koin.core.Koin
|
||||||
|
import org.koin.core.definition.BeanDefinition
|
||||||
|
import org.koin.core.definition.KoinDefinition
|
||||||
|
import org.koin.core.instance.InstanceFactory
|
||||||
|
import org.koin.core.parameter.ParametersDefinition
|
||||||
|
import org.koin.core.scope.Scope
|
||||||
|
|
||||||
|
fun <T> Koin.get(definition: BeanDefinition<T>, parameters: ParametersDefinition? = null): T = get(
|
||||||
|
definition.primaryType,
|
||||||
|
definition.qualifier,
|
||||||
|
parameters
|
||||||
|
)
|
||||||
|
|
||||||
|
fun <T> Koin.get(definition: InstanceFactory<T>, parameters: ParametersDefinition? = null): T = get(
|
||||||
|
definition.beanDefinition,
|
||||||
|
parameters
|
||||||
|
)
|
||||||
|
|
||||||
|
fun <T> Koin.get(definition: KoinDefinition<T>, parameters: ParametersDefinition? = null): T = get(
|
||||||
|
definition.factory,
|
||||||
|
parameters
|
||||||
|
)
|
||||||
|
|
||||||
|
fun <T> Scope.get(definition: BeanDefinition<T>, parameters: ParametersDefinition? = null): T = get(
|
||||||
|
definition.primaryType,
|
||||||
|
definition.qualifier,
|
||||||
|
parameters
|
||||||
|
)
|
||||||
|
|
||||||
|
fun <T> Scope.get(definition: InstanceFactory<T>, parameters: ParametersDefinition? = null): T = get(
|
||||||
|
definition.beanDefinition,
|
||||||
|
parameters
|
||||||
|
)
|
||||||
|
|
||||||
|
fun <T> Scope.get(definition: KoinDefinition<T>, parameters: ParametersDefinition? = null): T = get(
|
||||||
|
definition.factory,
|
||||||
|
parameters
|
||||||
|
)
|
@ -1,6 +1,6 @@
|
|||||||
package dev.inmo.micro_utils.ktor.common
|
package dev.inmo.micro_utils.ktor.common
|
||||||
|
|
||||||
import com.soywiz.klock.DateTime
|
import korlibs.time.DateTime
|
||||||
|
|
||||||
typealias FromToDateTime = Pair<DateTime?, DateTime?>
|
typealias FromToDateTime = Pair<DateTime?, DateTime?>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package dev.inmo.micro_utils.ktor.server
|
package dev.inmo.micro_utils.ktor.server
|
||||||
|
|
||||||
import com.soywiz.klock.DateTime
|
import korlibs.time.DateTime
|
||||||
import dev.inmo.micro_utils.ktor.common.FromToDateTime
|
import dev.inmo.micro_utils.ktor.common.FromToDateTime
|
||||||
import io.ktor.http.Parameters
|
import io.ktor.http.Parameters
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user