From 0e1d0a383389942437056fbde20aab67acf938b1 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 12 Jul 2016 12:01:58 -0700 Subject: [PATCH] Made Fail.NORMAL default. --- .idea/kobalt.xml | 5 ++ .idea/modules.xml | 1 + example/kobalt/src/Build.kt | 9 ++- kobalt-exec.iml | 64 +++++++++++++++++++ kobalt/src/Build.kt | 4 +- .../erik/kobalt/plugin/exec/ExecPlugin.kt | 7 +- 6 files changed, 82 insertions(+), 8 deletions(-) create mode 100644 kobalt-exec.iml diff --git a/.idea/kobalt.xml b/.idea/kobalt.xml index 22821d8..b43f7c3 100644 --- a/.idea/kobalt.xml +++ b/.idea/kobalt.xml @@ -6,6 +6,11 @@ diff --git a/.idea/modules.xml b/.idea/modules.xml index de1fa43..48f8f9e 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -3,6 +3,7 @@ + \ No newline at end of file diff --git a/example/kobalt/src/Build.kt b/example/kobalt/src/Build.kt index a55bb57..69a22e0 100644 --- a/example/kobalt/src/Build.kt +++ b/example/kobalt/src/Build.kt @@ -4,7 +4,10 @@ import com.beust.kobalt.plugin.application.* import com.beust.kobalt.plugin.java.* import net.thauvin.erik.kobalt.plugin.exec.* -val pl = plugins(file("../kobaltBuild/libs/kobalt-exec-0.1.jar")) +val repos = repos("https://dl.bintray.com/ethauvin/maven/") + +//val pl = plugins(file("../kobaltBuild/libs/kobalt-exec-0.5.0-beta.jar")) +val pl = plugins("net.thauvin.erik:kobalt-exec:0.5.1-beta") val p = project { @@ -37,7 +40,7 @@ val p = project { } exec { - commandLine(args = listOf("ls", "-l"), dir = "../libs", fail = setOf(Fail.NORMAL)) - commandLine(listOf("cmd", "/c", "echo", "Test"), os = listOf("Win", "Windows"), fail = setOf(Fail.NORMAL)) + commandLine(listOf("cmd", "/c", "echo", "Test"), os = setOf("Win")) + commandLine(args = listOf("ls", "-l"), dir = "../libs", os = setOf("Linux", "Win")) } } \ No newline at end of file diff --git a/kobalt-exec.iml b/kobalt-exec.iml new file mode 100644 index 0000000..55807a7 --- /dev/null +++ b/kobalt-exec.iml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index bd1af62..eb66fc3 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -17,7 +17,7 @@ val p = project { name = "kobalt-exec" group = "net.thauvin.erik" artifactId = name - version = "0.5.0-beta" + version = "0.5.1-beta" pom = Model().apply { name = project.name @@ -61,6 +61,6 @@ val p = project { } bintray { - publish = false + publish = true } } diff --git a/src/main/kotlin/net/thauvin/erik/kobalt/plugin/exec/ExecPlugin.kt b/src/main/kotlin/net/thauvin/erik/kobalt/plugin/exec/ExecPlugin.kt index 7c94f19..f042b55 100644 --- a/src/main/kotlin/net/thauvin/erik/kobalt/plugin/exec/ExecPlugin.kt +++ b/src/main/kotlin/net/thauvin/erik/kobalt/plugin/exec/ExecPlugin.kt @@ -147,13 +147,14 @@ enum class Fail() { } data class CommandLine(var args: List = emptyList(), var dir: String = "", - var os: List = emptyList(), var fail: Set = emptySet()) + var os: Set = emptySet(), var fail: Set = setOf(Fail.NORMAL)) data class ExecConfig(val project: Project) { val commandLines = arrayListOf() - @Directive fun commandLine(args: List = emptyList(), dir: String = "", os: List = emptyList(), - fail: Set = emptySet()) { + @Directive + fun commandLine(args: List = emptyList(), dir: String = "", os: Set = emptySet(), + fail: Set = setOf(Fail.NORMAL)) { if (args.size > 0) commandLines.add(CommandLine(args, dir, os, fail)) } }