Make the example work.

This commit is contained in:
Cedric Beust 2016-07-10 23:00:37 -08:00
parent 4da1358260
commit d8d93405e1
2 changed files with 8 additions and 3 deletions

View file

@ -2,7 +2,9 @@ import com.beust.kobalt.*
import com.beust.kobalt.plugin.packaging.* import com.beust.kobalt.plugin.packaging.*
import com.beust.kobalt.plugin.application.* import com.beust.kobalt.plugin.application.*
import com.beust.kobalt.plugin.java.* import com.beust.kobalt.plugin.java.*
//import net.thauvin.erik.kobalt.plugin.exec.* import net.thauvin.erik.kobalt.plugin.exec.*
val pl = plugins(file("../kobaltBuild/libs/kobalt-exec-0.1.jar"))
val p = project { val p = project {
@ -20,7 +22,6 @@ val p = project {
} }
dependencies { dependencies {
compile(file("../libs/kobalt-exec-0.1.jar"))
} }
dependenciesTest { dependenciesTest {
@ -34,4 +35,8 @@ val p = project {
application { application {
mainClass = "com.example.Main" mainClass = "com.example.Main"
} }
exec {
commandLine(args = arrayOf("ls"))
}
} }

View file

@ -68,7 +68,7 @@ class ExecPlugin : BasePlugin(), ITaskContributor {
if (config != null) { if (config != null) {
config.commandLines.forEach { config.commandLines.forEach {
log(2, "Executing: '" + { it.args.joinToString { " " } } + "' in '{$it.dir}'") log(2, "Executing: '" + it.args.joinToString(" ") + "' in '${it.dir}'")
success = true success = true
} }
} }