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:
parent
86b76b91c7
commit
59c5a8310c
33 changed files with 204 additions and 135 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue