diff --git a/CHANGELOG.md b/CHANGELOG.md index fc0af043fba..1c88012e421 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.19.0 + +* `Versions`: + * `Korlibs`: `4.0.1` + ## 0.18.4 * `Koin`: diff --git a/crypto/src/commonMain/kotlin/dev/inmo/micro_utils/crypto/MD5.kt b/crypto/src/commonMain/kotlin/dev/inmo/micro_utils/crypto/MD5.kt index 37dc958212c..83fb48ebfa8 100644 --- a/crypto/src/commonMain/kotlin/dev/inmo/micro_utils/crypto/MD5.kt +++ b/crypto/src/commonMain/kotlin/dev/inmo/micro_utils/crypto/MD5.kt @@ -1,6 +1,6 @@ package dev.inmo.micro_utils.crypto -import com.soywiz.krypto.md5 +import korlibs.crypto.md5 typealias MD5 = String diff --git a/gradle.properties b/gradle.properties index c5300e441c6..55036a46996 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,5 +14,5 @@ crypto_js_version=4.1.1 # Project data group=dev.inmo -version=0.18.4 -android_code_version=195 +version=0.19.0 +android_code_version=196 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 733b7ddb500..bc5b1187f25 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -10,7 +10,7 @@ jb-compose = "1.4.0" jb-exposed = "0.41.1" jb-dokka = "1.8.10" -korlibs = "3.4.0" +korlibs = "4.0.1" uuid = "0.7.0" ktor = "2.3.0" diff --git a/koin/src/commonMain/kotlin/GetWithDefinition.kt b/koin/src/commonMain/kotlin/GetWithDefinition.kt new file mode 100644 index 00000000000..32cc88bad9e --- /dev/null +++ b/koin/src/commonMain/kotlin/GetWithDefinition.kt @@ -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 Koin.get(definition: BeanDefinition, parameters: ParametersDefinition? = null): T = get( + definition.primaryType, + definition.qualifier, + parameters +) + +fun Koin.get(definition: InstanceFactory, parameters: ParametersDefinition? = null): T = get( + definition.beanDefinition, + parameters +) + +fun Koin.get(definition: KoinDefinition, parameters: ParametersDefinition? = null): T = get( + definition.factory, + parameters +) + +fun Scope.get(definition: BeanDefinition, parameters: ParametersDefinition? = null): T = get( + definition.primaryType, + definition.qualifier, + parameters +) + +fun Scope.get(definition: InstanceFactory, parameters: ParametersDefinition? = null): T = get( + definition.beanDefinition, + parameters +) + +fun Scope.get(definition: KoinDefinition, parameters: ParametersDefinition? = null): T = get( + definition.factory, + parameters +) diff --git a/ktor/common/src/commonMain/kotlin/dev/inmo/micro_utils/ktor/common/FromToDateTimeUrl.kt b/ktor/common/src/commonMain/kotlin/dev/inmo/micro_utils/ktor/common/FromToDateTimeUrl.kt index ff015524268..d6707f69d3a 100644 --- a/ktor/common/src/commonMain/kotlin/dev/inmo/micro_utils/ktor/common/FromToDateTimeUrl.kt +++ b/ktor/common/src/commonMain/kotlin/dev/inmo/micro_utils/ktor/common/FromToDateTimeUrl.kt @@ -1,6 +1,6 @@ package dev.inmo.micro_utils.ktor.common -import com.soywiz.klock.DateTime +import korlibs.time.DateTime typealias FromToDateTime = Pair diff --git a/ktor/server/src/jvmMain/kotlin/dev/inmo/micro_utils/ktor/server/FromToDateTimeInUrl.kt b/ktor/server/src/jvmMain/kotlin/dev/inmo/micro_utils/ktor/server/FromToDateTimeInUrl.kt index c7e850a9bfd..c266187966a 100644 --- a/ktor/server/src/jvmMain/kotlin/dev/inmo/micro_utils/ktor/server/FromToDateTimeInUrl.kt +++ b/ktor/server/src/jvmMain/kotlin/dev/inmo/micro_utils/ktor/server/FromToDateTimeInUrl.kt @@ -1,6 +1,6 @@ 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 io.ktor.http.Parameters