update gradle config and fix build

This commit is contained in:
InsanusMokrassar 2021-09-04 14:58:15 +06:00
parent eed7cfdc42
commit c9bbfa3820
2 changed files with 4 additions and 6 deletions

View File

@ -39,11 +39,9 @@ object ContextSafelyExceptionHandlerKey : CoroutineContext.Key<ContextSafelyExce
*/
class ContextSafelyExceptionHandler(
val handler: ExceptionHandler<Unit>
) : CoroutineContext.Element, CoroutineExceptionHandler {
) : CoroutineContext.Element {
override val key: CoroutineContext.Key<*>
get() = ContextSafelyExceptionHandlerKey
override fun handleException(context: CoroutineContext, exception: Throwable) = handler(exception)
}
/**
@ -150,9 +148,9 @@ suspend inline fun <T> runCatchingSafelyWithoutExceptions(
safelyWithoutExceptions(onException, block)
}
suspend inline fun CoroutineScope(
inline fun CoroutineScope(
context: CoroutineContext,
defaultExceptionsHandler: ExceptionHandler<Unit>
noinline defaultExceptionsHandler: ExceptionHandler<Unit>
) = CoroutineScope(
context + ContextSafelyExceptionHandler(defaultExceptionsHandler)
)

View File

@ -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