diff --git a/plug-in-development/index.html b/plug-in-development/index.html index a051701..7c33702 100644 --- a/plug-in-development/index.html +++ b/plug-in-development/index.html @@ -546,18 +546,20 @@ intrface:
interface ITaskContributor { -fun tasksFor(context: KobaltContext) : List<DynamicTask> + fun tasksFor(project: Project, context: KobaltContext) : List<DynamicTask> }
For example:
-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() }))diff --git a/ten-minutes/index.html b/ten-minutes/index.html index 0589c60..0a5eec7 100644 --- a/ten-minutes/index.html +++ b/ten-minutes/index.html @@ -91,23 +91,11 @@ val project = project { ...
- We also need to add Kobalt as a dependency, so let's find out what the latest version of the - jar file: -
--$ ./kobaltw --resolve com.beust:kobalt: -+======================================================================+ -| com.beust:kobalt: | -| https://jcenter.bintray.com/com/beust/kobalt/0.335/kobalt-0.335.jar | -+======================================================================+-
-
- Note that the Maven id above doesn't specify a version (it ends with a colon), which means - Kobalt will resolve it to the latest version it can find.Let's add this version in our dependencies: + We also need to add Kobalt Plug-in API as a dependency:
dependencies { - compile("com.beust:kobalt:0.335") + compile("com.beust:kobalt-plugin-api:") }
@@ -303,7 +291,7 @@ public class Main : BasePlugin() {
val p = plugins( - file(homeDir("kotlin/kobalt-line-count/kobaltBuild/libs/kobalt-line-count-0.8.jar")) + file(homeDir("kotlin/kobalt-line-count/kobaltBuild/libs/kobalt-line-count-0.2.jar")) )