subkt / myaa.subkt.tasks / ItemGroupContext / task
fun <T :
Task
> task(name:
String
, klass:
KClass
<
T
>):
TaskGroup
<
T
>
(source)
Create a new task group, or returns the task group with the given name if it already exists.
val copyTaskGroup = task("copy", SubCopy::class)
name
- The name of the task group.
klass
- The type of task associated with the task group.fun <T :
Task
> task(name:
String
, klass:
KClass
<
T
>, action:
T
.() ->
Unit
):
TaskGroup
<
T
>
(source)
Creates a new task group, or returns the task group with the given name if it already exists, and configures a task for each entry in the current context using the given closure.
task("copy", SubCopy::class) {
from(mux.item())
into("downloads")
}
name
- The name of the task group.
klass
- The type of task associated with the task group.
action
- A closure operating on a Task. Called once for
each entry in the current context.inline fun <reified T :
Task
> task(name:
String
):
TaskGroup
<
T
>
(source)
Creates a new task group, or returns the task group with the given name if it already exists.
val copyTaskGroup = task<SubCopy>("copy")
name
- The name of the task group.
T
- The type of task associated with the task group.inline fun <reified T :
Task
> task(name:
String
, noinline action:
T
.() ->
Unit
):
TaskGroup
<
T
>
(source)
Creates a new task group, or returns the task group with the given name if it already exists, and configures a task for each entry in the current context using the given closure.
task<SubCopy>("copy") {
from(mux.item())
into("downloads")
}
name
- The name of the task group.
T
- The type of task associated with the task group.
action
- A closure operating on a Task. Called once for
each entry in the current context.inline fun <reified T :
Task
> task(noinline action: (
T
.() ->
Unit
)? = null):
TaskCreator
<
T
>
(source)
Returns a delegate that when accessed returns a task group with the same name as the property it is bound to. Optionally configures one task for each entry in the current context using the given closure.
val copy by task<SubCopy> {
from(mux.item())
into("downloads")
}
T
- The type of task associated with the task group.
action
- A closure operating on a Task. Called once for
each entry in the current context.