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

Merge pull request #2 from ethauvin/master

Updated to newer API
This commit is contained in:
Cedric Beust 2016-08-04 18:00:39 -07:00 committed by GitHub
commit a5510be426
6 changed files with 19 additions and 7 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:")

Binary file not shown.

View file

@ -1 +1 @@
kobalt.version=0.755 kobalt.version=0.889

View file

@ -1 +1,2 @@
java -jar $(dirname $0)/kobalt/wrapper/kobalt-wrapper.jar $* #!/usr/bin/env sh
java -jar "`dirname "$0"`/kobalt/wrapper/kobalt-wrapper.jar" $*

4
kobaltw.bat Normal file
View file

@ -0,0 +1,4 @@
@echo off
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
java -jar "%DIRNAME%/kobalt/wrapper/kobalt-wrapper.jar" %*

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 {