diff --git a/CHANGELOG.md b/CHANGELOG.md index 2860bd4a4d6..4c8f38e77cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.5.24 + +* `Versions`: + * `Coroutines`: `1.5.1` -> `1.5.2` + * `Klock`: `2.3.4` -> `2.4.1` +* `Coroutines`: + * New function `CoroutineScope` with safely exceptions handler as second parameter + ## 0.5.23 * `Versions`: diff --git a/coroutines/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/HandleSafely.kt b/coroutines/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/HandleSafely.kt index 8fb0d3ad3f9..bc662e79086 100644 --- a/coroutines/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/HandleSafely.kt +++ b/coroutines/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/HandleSafely.kt @@ -147,3 +147,10 @@ suspend inline fun runCatchingSafelyWithoutExceptions( ): Result = runCatching { safelyWithoutExceptions(onException, block) } + +inline fun CoroutineScope( + context: CoroutineContext, + noinline defaultExceptionsHandler: ExceptionHandler +) = CoroutineScope( + context + ContextSafelyExceptionHandler(defaultExceptionsHandler) +) diff --git a/gradle.properties b/gradle.properties index 09c465ae2d1..0bb6ea64dc4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,13 +8,13 @@ android.enableJetifier=true org.gradle.jvmargs=-Xmx2g kotlin_version=1.5.30 -kotlin_coroutines_version=1.5.1 +kotlin_coroutines_version=1.5.2 kotlin_serialisation_core_version=1.2.2 kotlin_exposed_version=0.34.1 ktor_version=1.6.3 -klockVersion=2.3.4 +klockVersion=2.4.1 github_release_plugin_version=2.2.12 @@ -45,5 +45,5 @@ dokka_version=1.5.0 # Project data group=dev.inmo -version=0.5.23 -android_code_version=64 +version=0.5.24 +android_code_version=65 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 05679dc3c18..ffed3a254e9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists