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:
parent
75fbaa4538
commit
ce93cc0395
2 changed files with 9 additions and 19 deletions
|
@ -546,18 +546,20 @@ intrface:
|
|||
</p>
|
||||
<pre class="brush:java">
|
||||
interface ITaskContributor {
|
||||
fun tasksFor(context: KobaltContext) : List<DynamicTask>
|
||||
fun tasksFor(project: Project, context: KobaltContext) : List<DynamicTask>
|
||||
}</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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue