diff --git a/README.md b/README.md index 3410019..be471c3 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ # kobalt-line-count, a plug-in for the Kobalt build system + +Please see [the Kobalt documentation](http://beust.com/kobalt/ten-minutes/index.html) where this plug-in is explained in details. diff --git a/build.gradle b/build.gradle index 91c6674..c6ea071 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,5 @@ buildscript { + ext.kotlin_version = '1.0.0-beta-3595' ext.kotlin_version = '0.14.449' repositories { jcenter() @@ -10,6 +11,7 @@ buildscript { dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}" classpath "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -23,7 +25,8 @@ apply plugin: 'kotlin' dependencies { compile "com.google.guava:guava:18.0" - compile "com.beust:kobalt:0.174" + compile "com.beust:kobalt:0.329" + compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } sourceSets { main.java.srcDirs += 'src/main/kotlin' diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index 0c88381..1faf505 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -5,7 +5,7 @@ import com.beust.kobalt.plugin.publish.* //import com.beust.kobalt.plugin.linecount.lineCount //val plugins = plugins( -//// "com.beust.kobalt:kobalt-line-count:0.14" +// "com.beust.kobalt:kobalt-line-count:0.14" // file(homeDir("kotlin/kobalt-line-count/kobaltBuild/libs/kobalt-line-count-0.14.jar")) //) diff --git a/kobalt/wrapper/kobalt-wrapper.jar b/kobalt/wrapper/kobalt-wrapper.jar index 9848150..d8394fe 100644 Binary files a/kobalt/wrapper/kobalt-wrapper.jar and b/kobalt/wrapper/kobalt-wrapper.jar differ diff --git a/kobalt/wrapper/kobalt-wrapper.properties b/kobalt/wrapper/kobalt-wrapper.properties index 119b07a..0faba10 100644 --- a/kobalt/wrapper/kobalt-wrapper.properties +++ b/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=0.388 \ No newline at end of file +kobalt.version=0.388 diff --git a/kobaltw b/kobaltw index 37966eb..1fd228d 100755 --- a/kobaltw +++ b/kobaltw @@ -1,2 +1,2 @@ -java -jar kobalt/wrapper/kobalt-wrapper.jar $* - +#!/usr/bin/env bash +java -jar $(dirname $0)/kobalt/wrapper/kobalt-wrapper.jar $* diff --git a/src/main/kotlin/com/beust/kobalt/plugin/linecount/LineCountPlugin.kt b/src/main/kotlin/com/beust/kobalt/plugin/linecount/LineCountPlugin.kt index cf842dc..2f8acf6 100644 --- a/src/main/kotlin/com/beust/kobalt/plugin/linecount/LineCountPlugin.kt +++ b/src/main/kotlin/com/beust/kobalt/plugin/linecount/LineCountPlugin.kt @@ -13,12 +13,12 @@ import java.nio.file.attribute.BasicFileAttributes //} public class LineCountPlugin : BasePlugin(), ITaskContributor { - override fun tasksFor(context: KobaltContext) - = listOf(DynamicTask(this, "dynamicTask", "Dynamic task", runBefore = listOf("compile"), - closure = { project -> - println("Running dynamic task") + // ITaskContributor + override fun tasksFor(context: KobaltContext) = listOf( + DynamicTask(this, "dynamicTask", "Dynamic task", runBefore = listOf("compile"), closure = { TaskResult() - })) + }) + ) companion object { const val NAME : String = "kobalt-line-count" diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/kobalt-plugin.xml similarity index 100% rename from src/main/resources/META-INF/plugin.xml rename to src/main/resources/META-INF/kobalt-plugin.xml