Skip to content

Commit b38282f

Browse files
committed
Add vararg version of Subs.tasks
Fixes #6
1 parent 5b8392e commit b38282f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/kotlin/myaa/subkt/tasks/plugin.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,15 @@ open class Subs(val project: Project) : ItemGroupContext() {
410410
fun tasks(entries: Iterable<String>, action: ItemGroupContext.() -> Unit) =
411411
InnerContext(entries).action()
412412

413+
/**
414+
* Creates a context for generating tasks for the specified entries.
415+
*
416+
* @param entries Entries to generate tasks for.
417+
* @param action A closure operating on a [ItemGroupContext] entry.
418+
*/
419+
fun tasks(vararg entries: String, action: ItemGroupContext.() -> Unit) =
420+
InnerContext(entries.toList()).action()
421+
413422
/**
414423
* Creates a context for generating tasks for the specified entries.
415424
*

0 commit comments

Comments
 (0)