build: update build-time dependencies, address new warnings (#413)

* build: update build-time dependencies, address new warnings

* build: switch to central repo declaration, remove redundant repositories

* build: use spotless predeclaration, more task avoidance on kotlin modules
This commit is contained in:
zml 2022-12-08 20:40:52 -08:00 committed by Jason
parent 86b76b91c7
commit 59c5a8310c
33 changed files with 204 additions and 135 deletions

View file

@ -60,7 +60,7 @@ public fun interface SuspendingExecutionHandler<C : Any> {
*/
public fun asCommandExecutionHandler(
scope: CoroutineScope = GlobalScope,
context: CoroutineContext = EmptyCoroutineContext,
context: CoroutineContext = EmptyCoroutineContext
): CommandExecutionHandler<C> = createCommandExecutionHandler(scope, context, this)
public companion object {
@ -76,7 +76,7 @@ public fun interface SuspendingExecutionHandler<C : Any> {
public fun <C : Any> createCommandExecutionHandler(
scope: CoroutineScope = GlobalScope,
context: CoroutineContext = EmptyCoroutineContext,
handler: SuspendingExecutionHandler<C>,
handler: SuspendingExecutionHandler<C>
): CommandExecutionHandler<C> = CommandExecutionHandler.FutureCommandExecutionHandler { ctx ->
scope.future(context) {
handler(ctx)

View file

@ -43,5 +43,5 @@ import kotlin.coroutines.EmptyCoroutineContext
public fun <C : Any> Command.Builder<C>.suspendingHandler(
scope: CoroutineScope = GlobalScope,
context: CoroutineContext = EmptyCoroutineContext,
handler: SuspendingExecutionHandler<C>,
handler: SuspendingExecutionHandler<C>
): Command.Builder<C> = handler(SuspendingExecutionHandler.createCommandExecutionHandler(scope, context, handler))

View file

@ -43,7 +43,7 @@ import kotlin.coroutines.EmptyCoroutineContext
public fun <C : Any> MutableCommandBuilder<C>.suspendingHandler(
scope: CoroutineScope = GlobalScope,
context: CoroutineContext = EmptyCoroutineContext,
handler: SuspendingExecutionHandler<C>,
handler: SuspendingExecutionHandler<C>
): MutableCommandBuilder<C> = mutate {
it.suspendingHandler(scope, context, handler)
}