1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt-line-count.git synced 2025-04-25 03:07:11 -07:00

Update to newer API.

This commit is contained in:
Erik C. Thauvin 2016-08-04 17:52:09 -07:00
parent 15a5402b73
commit 3f37f59ee6
2 changed files with 12 additions and 5 deletions

View file

@ -17,7 +17,7 @@ val project = project {
name = "kobalt-line-count" name = "kobalt-line-count"
group = "com.beust.kobalt" group = "com.beust.kobalt"
artifactId = name artifactId = name
version = "0.19" version = "0.6"
dependencies { dependencies {
compile("com.beust:kobalt-plugin-api:") compile("com.beust:kobalt-plugin-api:")

View file

@ -14,10 +14,17 @@ import java.nio.file.attribute.BasicFileAttributes
public class LineCountPlugin : BasePlugin(), ITaskContributor { public class LineCountPlugin : BasePlugin(), ITaskContributor {
// ITaskContributor // ITaskContributor
override fun tasksFor(context: KobaltContext) = listOf( override fun tasksFor(project: Project, context: KobaltContext) = listOf(
DynamicTask(this, "dynamicTask", "Dynamic task", runBefore = listOf("compile"), closure = { DynamicTask(this,
TaskResult() "dynamicTask",
}) "Dynamic task",
"other",
project,
runBefore = listOf("compile"),
closure = {
TaskResult()
}
)
) )
companion object { companion object {