1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt-doc.git synced 2025-04-25 12:07:10 -07:00

Updated plug-in dev docs to newer API.

This commit is contained in:
Erik C. Thauvin 2016-08-04 17:42:05 -07:00
parent 75fbaa4538
commit ce93cc0395
2 changed files with 9 additions and 19 deletions

View file

@ -546,18 +546,20 @@ intrface:
</p>
<pre class="brush:java">
interface ITaskContributor {
fun tasksFor(context: KobaltContext) : List&lt;DynamicTask&gt;
fun tasksFor(project: Project, context: KobaltContext) : List&lt;DynamicTask&gt;
}</pre>
<p>
For example:
</p>
<pre class="brush:java">
override fun tasksFor(context: KobaltContext) = listOf(
DynamicTask(
override fun tasksFor(project: Project, context: KobaltContext) = listOf(
DynamicTask(this
name = "dynamicTask",
description = "Description",
group = "other",
project = project,
reverseDependsOn = listOf("compile"),
closure = { project: Project ->
closure = { project ->
println("Running dynamicTask")
TaskResult()
}))</pre>