From cd08c52ce5e9aff574d66197f69e9116ac85ff94 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 25 Jul 2016 19:11:30 -0700 Subject: [PATCH 01/52] Updated to kobalt 0.869 --- example/kobalt/wrapper/kobalt-wrapper.jar | Bin 9230 -> 9230 bytes .../kobalt/wrapper/kobalt-wrapper.properties | 2 +- kobalt/wrapper/kobalt-wrapper.jar | Bin 9230 -> 9230 bytes kobalt/wrapper/kobalt-wrapper.properties | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/kobalt/wrapper/kobalt-wrapper.jar b/example/kobalt/wrapper/kobalt-wrapper.jar index d3f775ae308acb7c1dc024c62b6cbb596865c961..50599933b5f71b35d8483a5e603bda8c491b9b90 100644 GIT binary patch delta 98 zcmeD4==0zW@MdNaVc_84U=URKIgz)W8AxrMZm+~Fpz?F_O(j$1%}5&2DrA#hRV($eUr5&2DrA#hRV($eUr Date: Sun, 31 Jul 2016 13:49:39 -0700 Subject: [PATCH 02/52] Updated to Kobalt 0.879 --- .idea/kobalt.xml | 7 +-- .idea/modules.xml | 1 - .idea/vcs.xml | 1 + example/kobalt/wrapper/kobalt-wrapper.jar | Bin 9230 -> 9230 bytes .../kobalt/wrapper/kobalt-wrapper.properties | 2 +- kobalt-exec.iml | 55 ------------------ kobalt/src/Build.kt | 11 +++- kobalt/wrapper/kobalt-wrapper.jar | Bin 9230 -> 9230 bytes kobalt/wrapper/kobalt-wrapper.properties | 2 +- 9 files changed, 14 insertions(+), 65 deletions(-) delete mode 100644 kobalt-exec.iml diff --git a/.idea/kobalt.xml b/.idea/kobalt.xml index 4511d0d..c63b8f8 100644 --- a/.idea/kobalt.xml +++ b/.idea/kobalt.xml @@ -5,12 +5,7 @@ + diff --git a/.idea/modules.xml b/.idea/modules.xml index 48f8f9e..de1fa43 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -3,7 +3,6 @@ - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index d175698..4c0d94b 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -4,5 +4,6 @@ + \ No newline at end of file diff --git a/example/kobalt/wrapper/kobalt-wrapper.jar b/example/kobalt/wrapper/kobalt-wrapper.jar index 50599933b5f71b35d8483a5e603bda8c491b9b90..055a613dd54e049bdda8e72aa313099b34c3db5b 100644 GIT binary patch delta 98 zcmeD4==0zW@MdNaVc_84U{G)SH<7oU8AxrMZm-15-}Z0vO(j$1?N68(0=(HdX5QOv oBhJ9UAPU3*-i%Bl3~+6e4V9fi`X-kv`*8sEd4SYTKCA2q0D6NR{Qv*} delta 98 zcmeD4==0zW@MdNaVc_84U=URKIgz)W8AxrMZm+~Fpz?F_O(j$1%}5&2DrA#hRV($eUr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index 898aea5..7337d5b 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -1,12 +1,16 @@ import com.beust.kobalt.plugin.packaging.assemble import com.beust.kobalt.plugin.publish.bintray +import com.beust.kobalt.plugins import com.beust.kobalt.project import com.beust.kobalt.repos import org.apache.maven.model.Developer import org.apache.maven.model.License import org.apache.maven.model.Model import org.apache.maven.model.Scm +import net.thauvin.erik.kobalt.plugin.versioneye.* + +val pl = plugins("net.thauvin.erik:kobalt-versioneye:") val repos = repos() val dev = false @@ -47,7 +51,7 @@ val p = project { } dependencies { - compile("com.beust:$kobaltDependency:0.863") + compile("com.beust:$kobaltDependency:0.878") } dependenciesTest { @@ -62,4 +66,9 @@ val p = project { bintray { publish = true } + + versionEye { + org = "thauvin" + team = "Owners" + } } diff --git a/kobalt/wrapper/kobalt-wrapper.jar b/kobalt/wrapper/kobalt-wrapper.jar index 50599933b5f71b35d8483a5e603bda8c491b9b90..055a613dd54e049bdda8e72aa313099b34c3db5b 100644 GIT binary patch delta 98 zcmeD4==0zW@MdNaVc_84U{G)SH<7oU8AxrMZm-15-}Z0vO(j$1?N68(0=(HdX5QOv oBhJ9UAPU3*-i%Bl3~+6e4V9fi`X-kv`*8sEd4SYTKCA2q0D6NR{Qv*} delta 98 zcmeD4==0zW@MdNaVc_84U=URKIgz)W8AxrMZm+~Fpz?F_O(j$1%}5&2DrA#hRV($eUr Date: Sun, 31 Jul 2016 20:44:47 -0700 Subject: [PATCH 03/52] Version 0.6.2 --- example/kobalt/src/Build.kt | 6 +++--- kobalt/src/Build.kt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example/kobalt/src/Build.kt b/example/kobalt/src/Build.kt index 3c9c4ee..82fd738 100644 --- a/example/kobalt/src/Build.kt +++ b/example/kobalt/src/Build.kt @@ -6,8 +6,8 @@ import net.thauvin.erik.kobalt.plugin.exec.* val repos = repos("https://dl.bintray.com/ethauvin/maven/") -//val pl = plugins(file("../kobaltBuild/libs/kobalt-exec-0.6.1.jar")) -val pl = plugins("net.thauvin.erik:kobalt-exec:0.6.1") +//val pl = plugins(file("../kobaltBuild/libs/kobalt-exec-0.6.2.jar")) +val pl = plugins("net.thauvin.erik:kobalt-exec:0.6.2") val example = project { @@ -56,4 +56,4 @@ val example2 = project { commandLine(listOf("cmd", "/c", "tasklist | find \"cmd.exe\""), os = setOf(Os.WINDOWS), fail = setOf(Fail.NONE)) commandLine(listOf("/bin/sh", "-c", "ps aux | grep bash"), os = setOf(Os.LINUX)) } -} \ No newline at end of file +} diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index 7337d5b..20c1be6 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -10,7 +10,7 @@ import org.apache.maven.model.Scm import net.thauvin.erik.kobalt.plugin.versioneye.* -val pl = plugins("net.thauvin.erik:kobalt-versioneye:") +val pl = plugins("net.thauvin.erik:kobalt-versioneye:0.4.2-beta") val repos = repos() val dev = false @@ -21,7 +21,7 @@ val p = project { name = "kobalt-exec" group = "net.thauvin.erik" artifactId = name - version = "0.6.1" + version = "0.6.2" pom = Model().apply { description = "Command Line Execution plug-in for the Kobalt build system." From 159f96c1d64b3c723a7fed0ef57f633225a8eb93 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Thu, 4 Aug 2016 20:59:17 -0700 Subject: [PATCH 04/52] Kobalt 0.889 update. --- .idea/kobalt.xml | 2 +- example/kobalt/wrapper/kobalt-wrapper.jar | Bin 9230 -> 9230 bytes .../kobalt/wrapper/kobalt-wrapper.properties | 2 +- kobalt/wrapper/kobalt-wrapper.jar | Bin 9230 -> 9230 bytes kobalt/wrapper/kobalt-wrapper.properties | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.idea/kobalt.xml b/.idea/kobalt.xml index c63b8f8..cf2c48e 100644 --- a/.idea/kobalt.xml +++ b/.idea/kobalt.xml @@ -5,7 +5,7 @@ diff --git a/example/kobalt/wrapper/kobalt-wrapper.jar b/example/kobalt/wrapper/kobalt-wrapper.jar index 055a613dd54e049bdda8e72aa313099b34c3db5b..b2026b9a714bbfc5af0ea46219a0c544924d3274 100644 GIT binary patch delta 104 zcmeD4==0zU@MdNaVc_84V6f0+@tnxl#sZ=@&ahKrF$Xdx-%>JG-LT;a6GMPEJI9il o&&|ad7#Ku>IKZ2cNrVBRb+VDN6Ik!$3T0mokY14L$!C=v0nE}EeE oyKTf77#Ku>IKZ2cNrVBRb+VDN6Ik!$3T0mokY14L$!C=v0U?JG-LT;a6GMPEJI9il o&&|ad7#Ku>IKZ2cNrVBRb+VDN6Ik!$3T0mokY14L$!C=v0nE}EeE oyKTf77#Ku>IKZ2cNrVBRb+VDN6Ik!$3T0mokY14L$!C=v0U? Date: Thu, 4 Aug 2016 20:59:50 -0700 Subject: [PATCH 05/52] Cleaned build files. --- example/kobalt/src/Build.kt | 2 -- kobalt/src/Build.kt | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/example/kobalt/src/Build.kt b/example/kobalt/src/Build.kt index 82fd738..972f763 100644 --- a/example/kobalt/src/Build.kt +++ b/example/kobalt/src/Build.kt @@ -4,8 +4,6 @@ import com.beust.kobalt.plugin.application.* import com.beust.kobalt.plugin.java.* import net.thauvin.erik.kobalt.plugin.exec.* -val repos = repos("https://dl.bintray.com/ethauvin/maven/") - //val pl = plugins(file("../kobaltBuild/libs/kobalt-exec-0.6.2.jar")) val pl = plugins("net.thauvin.erik:kobalt-exec:0.6.2") diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index 20c1be6..a732924 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -10,7 +10,7 @@ import org.apache.maven.model.Scm import net.thauvin.erik.kobalt.plugin.versioneye.* -val pl = plugins("net.thauvin.erik:kobalt-versioneye:0.4.2-beta") +val pl = plugins("net.thauvin.erik:kobalt-versioneye:") val repos = repos() val dev = false @@ -51,7 +51,7 @@ val p = project { } dependencies { - compile("com.beust:$kobaltDependency:0.878") + compile("com.beust:$kobaltDependency:") } dependenciesTest { @@ -68,7 +68,7 @@ val p = project { } versionEye { - org = "thauvin" + org = "Thauvin" team = "Owners" } } From 39dc7719308e4a6bda5bf4c9b3d96587f6b0f4e4 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 7 Aug 2016 10:22:15 -0700 Subject: [PATCH 06/52] Updated to Kobalt 0.890 --- example/kobalt/wrapper/kobalt-wrapper.jar | Bin 9230 -> 9230 bytes .../kobalt/wrapper/kobalt-wrapper.properties | 2 +- example/kobaltw | 2 +- kobalt/wrapper/kobalt-wrapper.jar | Bin 9230 -> 9230 bytes kobalt/wrapper/kobalt-wrapper.properties | 2 +- kobaltw | 2 +- 6 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 kobaltw diff --git a/example/kobalt/wrapper/kobalt-wrapper.jar b/example/kobalt/wrapper/kobalt-wrapper.jar index b2026b9a714bbfc5af0ea46219a0c544924d3274..7c076e6441773971b1a9a1b596ac45c2ba31d14e 100644 GIT binary patch delta 93 zcmeD4==0zS@MdNaVc_84VEDLVB2Nd?#}yl=IVb_C$v2eDluRBlF$8$CbKLTH{#=}a lfk70A1H2iTL>ORtCL1WbfK-<$`*VC;!Qu&0Ir*%zBLFms9zFm7 delta 93 zcmeD4==0zS@MdNaVc_84V6f1f$kV}Op}BFIgA$Xu=HwenW=b2LFfjypvvVw&`P^Kb nfq_93hy%PCnM4?1dL|nvy8ty!E>rgBFxO=91gV^SR@o5%>QEL! diff --git a/example/kobalt/wrapper/kobalt-wrapper.properties b/example/kobalt/wrapper/kobalt-wrapper.properties index 164fe5e..f6a87a0 100644 --- a/example/kobalt/wrapper/kobalt-wrapper.properties +++ b/example/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=0.889 \ No newline at end of file +kobalt.version=0.890 \ No newline at end of file diff --git a/example/kobaltw b/example/kobaltw index c5186d5..287d453 100755 --- a/example/kobaltw +++ b/example/kobaltw @@ -1,2 +1,2 @@ -#!/usr/bin/env sh +#!/bin/env sh java -jar "`dirname "$0"`/kobalt/wrapper/kobalt-wrapper.jar" $* diff --git a/kobalt/wrapper/kobalt-wrapper.jar b/kobalt/wrapper/kobalt-wrapper.jar index b2026b9a714bbfc5af0ea46219a0c544924d3274..7c076e6441773971b1a9a1b596ac45c2ba31d14e 100644 GIT binary patch delta 93 zcmeD4==0zS@MdNaVc_84VEDLVB2Nd?#}yl=IVb_C$v2eDluRBlF$8$CbKLTH{#=}a lfk70A1H2iTL>ORtCL1WbfK-<$`*VC;!Qu&0Ir*%zBLFms9zFm7 delta 93 zcmeD4==0zS@MdNaVc_84V6f1f$kV}Op}BFIgA$Xu=HwenW=b2LFfjypvvVw&`P^Kb nfq_93hy%PCnM4?1dL|nvy8ty!E>rgBFxO=91gV^SR@o5%>QEL! diff --git a/kobalt/wrapper/kobalt-wrapper.properties b/kobalt/wrapper/kobalt-wrapper.properties index 164fe5e..f6a87a0 100644 --- a/kobalt/wrapper/kobalt-wrapper.properties +++ b/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=0.889 \ No newline at end of file +kobalt.version=0.890 \ No newline at end of file diff --git a/kobaltw b/kobaltw old mode 100644 new mode 100755 index c5186d5..287d453 --- a/kobaltw +++ b/kobaltw @@ -1,2 +1,2 @@ -#!/usr/bin/env sh +#!/bin/env sh java -jar "`dirname "$0"`/kobalt/wrapper/kobalt-wrapper.jar" $* From 13f2ff6e50159d38621860232670305a55dc96f0 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 7 Aug 2016 10:35:10 -0700 Subject: [PATCH 07/52] TravisCI fix. --- example/kobaltw | 2 +- kobaltw | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/kobaltw b/example/kobaltw index 287d453..177549b 100755 --- a/example/kobaltw +++ b/example/kobaltw @@ -1,2 +1,2 @@ -#!/bin/env sh +#!/bin/sh java -jar "`dirname "$0"`/kobalt/wrapper/kobalt-wrapper.jar" $* diff --git a/kobaltw b/kobaltw index 287d453..177549b 100755 --- a/kobaltw +++ b/kobaltw @@ -1,2 +1,2 @@ -#!/bin/env sh +#!/bin/sh java -jar "`dirname "$0"`/kobalt/wrapper/kobalt-wrapper.jar" $* From 063f869468e32350d311e360864fb24a8f4746a8 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 7 Aug 2016 10:40:06 -0700 Subject: [PATCH 08/52] Debugging TravisCI. --- kobaltw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kobaltw b/kobaltw index 177549b..a52d1cc 100755 --- a/kobaltw +++ b/kobaltw @@ -1,2 +1,2 @@ -#!/bin/sh +#!/bin/sh -x java -jar "`dirname "$0"`/kobalt/wrapper/kobalt-wrapper.jar" $* From 50a6ba34af61bc45b35982387c61af66480af5ee Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 7 Aug 2016 10:52:23 -0700 Subject: [PATCH 09/52] Debugging TravisCI. --- kobaltw | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kobaltw b/kobaltw index a52d1cc..830f1c3 100755 --- a/kobaltw +++ b/kobaltw @@ -1,2 +1,2 @@ -#!/bin/sh -x -java -jar "`dirname "$0"`/kobalt/wrapper/kobalt-wrapper.jar" $* +#!/bin/sh +java -jar "`dirname $0`/kobalt/wrapper/kobalt-wrapper.jar" $* From eec696d1ea64ea2f8dd1278e2cac442a62c7f57a Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 7 Aug 2016 10:55:03 -0700 Subject: [PATCH 10/52] Debugging TravisCI. --- kobaltw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kobaltw b/kobaltw index 830f1c3..d3edc34 100755 --- a/kobaltw +++ b/kobaltw @@ -1,2 +1,2 @@ #!/bin/sh -java -jar "`dirname $0`/kobalt/wrapper/kobalt-wrapper.jar" $* +java -jar `dirname $0`/kobalt/wrapper/kobalt-wrapper.jar $* From 87b38723abdd39c5a1ae2e89a9ce14adb00f1df3 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 7 Aug 2016 10:59:44 -0700 Subject: [PATCH 11/52] Debugging TravisCI. --- kobaltw | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kobaltw b/kobaltw index d3edc34..c5186d5 100755 --- a/kobaltw +++ b/kobaltw @@ -1,2 +1,2 @@ -#!/bin/sh -java -jar `dirname $0`/kobalt/wrapper/kobalt-wrapper.jar $* +#!/usr/bin/env sh +java -jar "`dirname "$0"`/kobalt/wrapper/kobalt-wrapper.jar" $* From 0fe3515faffe448a1718c7af6b6521bd91305d7c Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 7 Aug 2016 11:08:33 -0700 Subject: [PATCH 12/52] Fixed TravisCI. --- example/kobaltw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/kobaltw b/example/kobaltw index 177549b..c5186d5 100755 --- a/example/kobaltw +++ b/example/kobaltw @@ -1,2 +1,2 @@ -#!/bin/sh +#!/usr/bin/env sh java -jar "`dirname "$0"`/kobalt/wrapper/kobalt-wrapper.jar" $* From fe121bb6453e7ae23fd5b07134d372fd54b45258 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 3 Oct 2016 15:49:36 -0700 Subject: [PATCH 13/52] Kobalt 0.905 update --- example/kobalt/wrapper/kobalt-wrapper.properties | 2 +- kobalt/wrapper/kobalt-wrapper.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/kobalt/wrapper/kobalt-wrapper.properties b/example/kobalt/wrapper/kobalt-wrapper.properties index f6a87a0..749bf48 100644 --- a/example/kobalt/wrapper/kobalt-wrapper.properties +++ b/example/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=0.890 \ No newline at end of file +kobalt.version=0.905 \ No newline at end of file diff --git a/kobalt/wrapper/kobalt-wrapper.properties b/kobalt/wrapper/kobalt-wrapper.properties index f6a87a0..749bf48 100644 --- a/kobalt/wrapper/kobalt-wrapper.properties +++ b/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=0.890 \ No newline at end of file +kobalt.version=0.905 \ No newline at end of file From 47ad7ed59ea6b603e91874e1d83db2719f1aa4a4 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 6 Mar 2017 11:06:37 -0800 Subject: [PATCH 14/52] Start of Kotlin 1.1 and Kobalt 1.0.x migration. --- .idea/kobalt.xml | 7 +- .idea/kotlinc.xml | 7 + .idea/misc.xml | 12 +- .idea/modules.xml | 1 + .idea/vcs.xml | 1 - example/kobalt/src/Build.kt | 2 +- kobalt-exec.iml | 439 +++++++++++++++++++++++ kobalt/Build.kt.iml | 25 +- kobalt/src/Build.kt | 11 +- kobalt/wrapper/kobalt-wrapper.properties | 2 +- 10 files changed, 483 insertions(+), 24 deletions(-) create mode 100644 .idea/kotlinc.xml create mode 100644 kobalt-exec.iml diff --git a/.idea/kobalt.xml b/.idea/kobalt.xml index cf2c48e..f893065 100644 --- a/.idea/kobalt.xml +++ b/.idea/kobalt.xml @@ -5,7 +5,12 @@ diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml new file mode 100644 index 0000000..1c24f9a --- /dev/null +++ b/.idea/kotlinc.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index cbe635d..2bf02d5 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -52,17 +52,7 @@ - - - - - - - - - - - + \ No newline at end of file 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/.idea/vcs.xml b/.idea/vcs.xml index 4c0d94b..d175698 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -4,6 +4,5 @@ - \ No newline at end of file diff --git a/example/kobalt/src/Build.kt b/example/kobalt/src/Build.kt index 972f763..f6d3d5f 100644 --- a/example/kobalt/src/Build.kt +++ b/example/kobalt/src/Build.kt @@ -51,7 +51,7 @@ val example2 = project { exec { commandLine(listOf("cmd", "/c", "echo", "Test Example 2"), os = setOf(Os.WINDOWS)) commandLine(listOf("echo", "Test example 2"), os = setOf(Os.LINUX)) - commandLine(listOf("cmd", "/c", "tasklist | find \"cmd.exe\""), os = setOf(Os.WINDOWS), fail = setOf(Fail.NONE)) + //commandLine(listOf("cmd", "/c", "tasklist | find \"cmd.exe\""), os = setOf(Os.WINDOWS), fail = setOf(Fail.NONE)) commandLine(listOf("/bin/sh", "-c", "ps aux | grep bash"), os = setOf(Os.LINUX)) } } diff --git a/kobalt-exec.iml b/kobalt-exec.iml new file mode 100644 index 0000000..0573f36 --- /dev/null +++ b/kobalt-exec.iml @@ -0,0 +1,439 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kobalt/Build.kt.iml b/kobalt/Build.kt.iml index f641794..a6e2d45 100644 --- a/kobalt/Build.kt.iml +++ b/kobalt/Build.kt.iml @@ -1,12 +1,31 @@ - - + + + + - + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index a732924..b7c8f8a 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -1,17 +1,16 @@ +import com.beust.kobalt.buildScript import com.beust.kobalt.plugin.packaging.assemble import com.beust.kobalt.plugin.publish.bintray -import com.beust.kobalt.plugins import com.beust.kobalt.project -import com.beust.kobalt.repos +import net.thauvin.erik.kobalt.plugin.versioneye.versionEye import org.apache.maven.model.Developer import org.apache.maven.model.License import org.apache.maven.model.Model import org.apache.maven.model.Scm -import net.thauvin.erik.kobalt.plugin.versioneye.* - -val pl = plugins("net.thauvin.erik:kobalt-versioneye:") -val repos = repos() +val bs = buildScript { + plugins("net.thauvin.erik:kobalt-versioneye:") +} val dev = false val kobaltDependency = if (dev) "kobalt" else "kobalt-plugin-api" diff --git a/kobalt/wrapper/kobalt-wrapper.properties b/kobalt/wrapper/kobalt-wrapper.properties index 749bf48..91fe49a 100644 --- a/kobalt/wrapper/kobalt-wrapper.properties +++ b/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=0.905 \ No newline at end of file +kobalt.version=1.0.3 \ No newline at end of file From 572ddd0a9f6310999d1e759663f2250460be93fd Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 6 Mar 2017 14:07:23 -0800 Subject: [PATCH 15/52] Rebuilt IDEA project from scratch. --- .idea/codeStyleSettings.xml | 9 ---- .idea/compiler.xml | 23 -------- .idea/copyright/Erik_s_Copyright_Notice.xml | 2 +- .idea/copyright/profiles_settings.xml | 2 +- .../inspectionProfiles/profiles_settings.xml | 7 --- .idea/kobalt.xml | 1 - .idea/misc.xml | 52 ------------------- .idea/scopes/Source.xml | 2 +- .idea/vcs.xml | 2 - .../kobalt/wrapper/kobalt-wrapper.properties | 2 +- 10 files changed, 4 insertions(+), 98 deletions(-) delete mode 100644 .idea/codeStyleSettings.xml delete mode 100644 .idea/compiler.xml delete mode 100644 .idea/inspectionProfiles/profiles_settings.xml diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml deleted file mode 100644 index 5add346..0000000 --- a/.idea/codeStyleSettings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index a852314..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/copyright/Erik_s_Copyright_Notice.xml b/.idea/copyright/Erik_s_Copyright_Notice.xml index 5cd1489..6763f1b 100644 --- a/.idea/copyright/Erik_s_Copyright_Notice.xml +++ b/.idea/copyright/Erik_s_Copyright_Notice.xml @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml index 89ab48c..2bbc8ca 100644 --- a/.idea/copyright/profiles_settings.xml +++ b/.idea/copyright/profiles_settings.xml @@ -1,5 +1,5 @@ - + diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 3b31283..0000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/kobalt.xml b/.idea/kobalt.xml index f893065..3764f2d 100644 --- a/.idea/kobalt.xml +++ b/.idea/kobalt.xml @@ -11,7 +11,6 @@ - diff --git a/.idea/misc.xml b/.idea/misc.xml index 2bf02d5..fbc2102 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,57 +1,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.idea/scopes/Source.xml b/.idea/scopes/Source.xml index f3b802c..d4fb9bf 100644 --- a/.idea/scopes/Source.xml +++ b/.idea/scopes/Source.xml @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index d175698..94a25f7 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -2,7 +2,5 @@ - - \ No newline at end of file diff --git a/example/kobalt/wrapper/kobalt-wrapper.properties b/example/kobalt/wrapper/kobalt-wrapper.properties index 749bf48..91fe49a 100644 --- a/example/kobalt/wrapper/kobalt-wrapper.properties +++ b/example/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=0.905 \ No newline at end of file +kobalt.version=1.0.3 \ No newline at end of file From 53e80b18e72583420afc2d264322057eefb7c3a9 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 6 Mar 2017 14:08:05 -0800 Subject: [PATCH 16/52] Kotlin 1.1 and Kobalt 1.0.x optimization --- example/kobalt/src/Build.kt | 5 +++-- .../erik/kobalt/plugin/exec/ExecPlugin.kt | 17 ++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/example/kobalt/src/Build.kt b/example/kobalt/src/Build.kt index f6d3d5f..e226bfa 100644 --- a/example/kobalt/src/Build.kt +++ b/example/kobalt/src/Build.kt @@ -4,8 +4,9 @@ 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.6.2.jar")) -val pl = plugins("net.thauvin.erik:kobalt-exec:0.6.2") +val bs = buildScript { + plugins("net.thauvin.erik:kobalt-exec:0.6.2") +} val example = project { 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 fb99d3a..2c9fb06 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 @@ -1,7 +1,7 @@ /* * ExecPlugin.kt * - * Copyright (c) 2016, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2016-2017, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -60,6 +60,7 @@ class ExecPlugin @Inject constructor(val configActor: ConfigActor) : override val name = NAME + @Suppress("unused") @Task(name = "exec", description = "Execute a command line process.") fun taskExec(project: Project): TaskResult { var result = TaskResult() @@ -109,7 +110,7 @@ class ExecPlugin @Inject constructor(val configActor: ConfigActor) : for ((args, dir, os, fail) in config.commandLines) { val wrkDir = File(if (dir.isNullOrBlank()) project.directory else dir) if (wrkDir.isDirectory) { - var execute = (os.size == 0) + var execute = (os.isEmpty()) if (!execute) { for (name in os) { execute = matchOs(name) @@ -126,7 +127,7 @@ class ExecPlugin @Inject constructor(val configActor: ConfigActor) : val stderr = if (proc.errorStream.available() > 0) fromStream(proc.errorStream) else emptyList() val cmdInfo = "Program \"" + args.joinToString(" ") + "\" (in directory \"${wrkDir.path}\"): " - if (err == false) { + if (!err) { errorMessage.append(cmdInfo).append("TIMEOUT") success = false } else if (!fail.contains(Fail.NONE)) { @@ -176,11 +177,11 @@ class ExecPlugin @Inject constructor(val configActor: ConfigActor) : } } -enum class Fail() { +enum class Fail { ALL, EXIT, NONE, NORMAL, OUTPUT, STDERR, STDOUT } -enum class Os() { +enum class Os { FREEBSD, LINUX, MAC, OPENVMS, OS400, SOLARIS, TANDEM, WINDOWS, ZOS } @@ -188,15 +189,17 @@ data class CommandLine(var args: List = emptyList(), var dir: String = " var fail: Set = setOf(Fail.NORMAL)) @Directive -class ExecConfig() { +class ExecConfig { val commandLines = arrayListOf() + @Suppress("unused") 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)) + if (args.isNotEmpty()) commandLines.add(CommandLine(args, dir, os, fail)) } } +@Suppress("unused") @Directive fun Project.exec(init: ExecConfig.() -> Unit) { ExecConfig().let { config -> From a4a3b24a7bad79787e97438ce893266ce6b28baa Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 6 Mar 2017 14:14:05 -0800 Subject: [PATCH 17/52] Kobalt 1.0.x syntax --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a51de8a..d70d5a7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,9 @@ To use the plug-in include the following in your `Build.kt` file: ```kotlin import net.thauvin.erik.kobalt.plugin.exec.* -val pl = plugins("net.thauvin.erik:kobalt-exc:") +val bs = buildScript { + plugins("net.thauvin.erik:kobalt-exc:") +} val p = project { name = "example" From 6013d9cfdfd90f414bd6491d937725b273381555 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 6 Mar 2017 20:21:10 -0800 Subject: [PATCH 18/52] Added example to IDEA project. --- .idea/kobalt.xml | 10 + .idea/modules.xml | 4 +- .idea/vcs.xml | 4 + example/example.iml | 15 + example/example2.iml | 15 + {kobalt => example/kobalt}/Build.kt.iml | 4 +- kobalt-exec.iml | 787 ++++++++++++------------ 7 files changed, 442 insertions(+), 397 deletions(-) create mode 100644 example/example.iml create mode 100644 example/example2.iml rename {kobalt => example/kobalt}/Build.kt.iml (90%) diff --git a/.idea/kobalt.xml b/.idea/kobalt.xml index 3764f2d..ed2be6d 100644 --- a/.idea/kobalt.xml +++ b/.idea/kobalt.xml @@ -12,6 +12,16 @@ + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index 48f8f9e..720e369 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,9 @@ - + + + diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 94a25f7..c42d940 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -2,5 +2,9 @@ + + + + \ No newline at end of file diff --git a/example/example.iml b/example/example.iml new file mode 100644 index 0000000..0e41929 --- /dev/null +++ b/example/example.iml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/example/example2.iml b/example/example2.iml new file mode 100644 index 0000000..c661fd1 --- /dev/null +++ b/example/example2.iml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kobalt/Build.kt.iml b/example/kobalt/Build.kt.iml similarity index 90% rename from kobalt/Build.kt.iml rename to example/kobalt/Build.kt.iml index a6e2d45..d022bf6 100644 --- a/kobalt/Build.kt.iml +++ b/example/kobalt/Build.kt.iml @@ -10,9 +10,9 @@ - + - + diff --git a/kobalt-exec.iml b/kobalt-exec.iml index 0573f36..24686a0 100644 --- a/kobalt-exec.iml +++ b/kobalt-exec.iml @@ -5,9 +5,8 @@ - - - + + @@ -21,397 +20,10 @@ - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -427,9 +39,396 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 91f5d23bc0037ecff30e556082fe7095ac778d78 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 6 Mar 2017 21:16:50 -0800 Subject: [PATCH 19/52] Release 0.6.3 prep --- example/kobalt/src/Build.kt | 16 +++++++++------- kobalt/src/Build.kt | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/example/kobalt/src/Build.kt b/example/kobalt/src/Build.kt index e226bfa..48495db 100644 --- a/example/kobalt/src/Build.kt +++ b/example/kobalt/src/Build.kt @@ -1,11 +1,13 @@ -import com.beust.kobalt.* -import com.beust.kobalt.plugin.packaging.* -import com.beust.kobalt.plugin.application.* -import com.beust.kobalt.plugin.java.* -import net.thauvin.erik.kobalt.plugin.exec.* +import com.beust.kobalt.buildScript +import com.beust.kobalt.plugin.application.application +import com.beust.kobalt.plugin.packaging.assemble +import com.beust.kobalt.project +import net.thauvin.erik.kobalt.plugin.exec.Os +import net.thauvin.erik.kobalt.plugin.exec.exec val bs = buildScript { - plugins("net.thauvin.erik:kobalt-exec:0.6.2") + //plugins(file("../kobaltBuild/libs/kobalt-exec-0.6.2.jar")) + plugins("net.thauvin.erik:kobalt-exec:") } val example = project { @@ -39,7 +41,7 @@ val example = project { } exec { - commandLine(listOf( "echo", "Test Example 1"), os = setOf(Os.LINUX)) + commandLine(listOf("echo", "Test Example 1"), os = setOf(Os.LINUX)) commandLine(listOf("cmd", "/c", "echo", "Test Example 1"), os = setOf(Os.WINDOWS)) commandLine(args = listOf("ls", "-l"), dir = "../libs", os = setOf(Os.LINUX)) commandLine(args = listOf("cmd", "/c", "dir /Q"), dir = "../libs", os = setOf(Os.WINDOWS)) diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index b7c8f8a..ff30d1e 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -20,7 +20,7 @@ val p = project { name = "kobalt-exec" group = "net.thauvin.erik" artifactId = name - version = "0.6.2" + version = "0.6.3" pom = Model().apply { description = "Command Line Execution plug-in for the Kobalt build system." From c4a59b86c333f34b1331d44441e4137b15eaf421 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 6 Mar 2017 22:25:09 -0800 Subject: [PATCH 20/52] Simplified imports. --- example/kobalt/src/Build.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/example/kobalt/src/Build.kt b/example/kobalt/src/Build.kt index 48495db..ba62bf0 100644 --- a/example/kobalt/src/Build.kt +++ b/example/kobalt/src/Build.kt @@ -1,12 +1,10 @@ -import com.beust.kobalt.buildScript +import com.beust.kobalt.* import com.beust.kobalt.plugin.application.application import com.beust.kobalt.plugin.packaging.assemble -import com.beust.kobalt.project -import net.thauvin.erik.kobalt.plugin.exec.Os -import net.thauvin.erik.kobalt.plugin.exec.exec +import net.thauvin.erik.kobalt.plugin.exec.* val bs = buildScript { - //plugins(file("../kobaltBuild/libs/kobalt-exec-0.6.2.jar")) + //plugins(file("../kobaltBuild/libs/kobalt-exec-0.6.3.jar")) plugins("net.thauvin.erik:kobalt-exec:") } From f823f3be8c9575abb3fdc164980b5ff163bb712a Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Wed, 8 Mar 2017 01:29:35 -0800 Subject: [PATCH 21/52] Added examples to main build file. --- .idea/encodings.xml | 6 -- .idea/inspectionProfiles/Project_Default.xml | 10 +-- .idea/kobalt.xml | 12 +--- .idea/misc.xml | 4 +- .idea/modules.xml | 2 +- .idea/vcs.xml | 2 - example/example.iml | 7 +- example/example2.iml | 7 +- example/kobalt/src/Build.kt | 9 ++- .../kobalt/wrapper/kobalt-wrapper.properties | 2 +- kobalt-exec.iml | 5 +- kobalt/Build.kt.iml | 40 +++++++++++ kobalt/src/Build.kt | 69 ++++++++++++++++++- kobalt/wrapper/kobalt-wrapper.properties | 2 +- 14 files changed, 135 insertions(+), 42 deletions(-) delete mode 100644 .idea/encodings.xml create mode 100644 kobalt/Build.kt.iml diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index 97626ba..0000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 8ff795e..17b1e81 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -1,8 +1,9 @@ diff --git a/.idea/kobalt.xml b/.idea/kobalt.xml index ed2be6d..52b4669 100644 --- a/.idea/kobalt.xml +++ b/.idea/kobalt.xml @@ -5,23 +5,13 @@ - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index fbc2102..f1a9bb1 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,4 @@ - - - + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index 720e369..e443ce8 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ - + diff --git a/.idea/vcs.xml b/.idea/vcs.xml index c42d940..d175698 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -4,7 +4,5 @@ - - \ No newline at end of file diff --git a/example/example.iml b/example/example.iml index 0e41929..a07481d 100644 --- a/example/example.iml +++ b/example/example.iml @@ -1,8 +1,8 @@ - + - - + + @@ -11,5 +11,6 @@ + \ No newline at end of file diff --git a/example/example2.iml b/example/example2.iml index c661fd1..7109c9b 100644 --- a/example/example2.iml +++ b/example/example2.iml @@ -1,8 +1,8 @@ - + - - + + @@ -11,5 +11,6 @@ + \ No newline at end of file diff --git a/example/kobalt/src/Build.kt b/example/kobalt/src/Build.kt index ba62bf0..256c64a 100644 --- a/example/kobalt/src/Build.kt +++ b/example/kobalt/src/Build.kt @@ -1,10 +1,13 @@ import com.beust.kobalt.* -import com.beust.kobalt.plugin.application.application -import com.beust.kobalt.plugin.packaging.assemble +import com.beust.kobalt.plugin.application.* +import com.beust.kobalt.plugin.packaging.* import net.thauvin.erik.kobalt.plugin.exec.* +// ./kobaltw exec +// ./kobaltw example:exec +// ./kobaltw example2:exec + val bs = buildScript { - //plugins(file("../kobaltBuild/libs/kobalt-exec-0.6.3.jar")) plugins("net.thauvin.erik:kobalt-exec:") } diff --git a/example/kobalt/wrapper/kobalt-wrapper.properties b/example/kobalt/wrapper/kobalt-wrapper.properties index 91fe49a..1ec9521 100644 --- a/example/kobalt/wrapper/kobalt-wrapper.properties +++ b/example/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=1.0.3 \ No newline at end of file +kobalt.version=1.0.5 \ No newline at end of file diff --git a/kobalt-exec.iml b/kobalt-exec.iml index 24686a0..b9f476d 100644 --- a/kobalt-exec.iml +++ b/kobalt-exec.iml @@ -5,8 +5,9 @@ - - + + + diff --git a/kobalt/Build.kt.iml b/kobalt/Build.kt.iml new file mode 100644 index 0000000..c6d6e39 --- /dev/null +++ b/kobalt/Build.kt.iml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index ff30d1e..e931620 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -1,15 +1,29 @@ import com.beust.kobalt.buildScript +import com.beust.kobalt.file +import com.beust.kobalt.misc.kobaltLog +import com.beust.kobalt.plugin.application.application import com.beust.kobalt.plugin.packaging.assemble import com.beust.kobalt.plugin.publish.bintray import com.beust.kobalt.project +import net.thauvin.erik.kobalt.plugin.exec.Os +import net.thauvin.erik.kobalt.plugin.exec.exec import net.thauvin.erik.kobalt.plugin.versioneye.versionEye import org.apache.maven.model.Developer import org.apache.maven.model.License import org.apache.maven.model.Model import org.apache.maven.model.Scm +val semver = "0.6.3" + val bs = buildScript { - plugins("net.thauvin.erik:kobalt-versioneye:") + val f = java.io.File("kobaltBuild/libs/kobalt-exec-$semver.jar") + val p = if (f.exists()) { + kobaltLog(1, " >>> Using: ${f.path}") + file(f.path) + } else { + "net.thauvin.erik:kobalt-exec:" + } + plugins("net.thauvin.erik:kobalt-versioneye:", p) } val dev = false @@ -20,7 +34,7 @@ val p = project { name = "kobalt-exec" group = "net.thauvin.erik" artifactId = name - version = "0.6.3" + version = semver pom = Model().apply { description = "Command Line Execution plug-in for the Kobalt build system." @@ -71,3 +85,54 @@ val p = project { team = "Owners" } } + +val example = project(p) { + + name = "example" + group = "com.example" + artifactId = name + version = "0.1" + directory = ("example") + + sourceDirectories { + path("src/main/java") + } + + sourceDirectoriesTest { + path("src/test/java") + } + + dependencies { + } + + dependenciesTest { + } + + assemble { + jar { + } + } + + application { + mainClass = "com.example.Main" + } + + exec { + commandLine(listOf("echo", "Test Example 1"), os = setOf(Os.LINUX)) + commandLine(listOf("cmd", "/c", "echo", "Test Example 1"), os = setOf(Os.WINDOWS)) + commandLine(args = listOf("ls", "-l"), dir = "../libs", os = setOf(Os.LINUX)) + commandLine(args = listOf("cmd", "/c", "dir /Q"), dir = "../libs", os = setOf(Os.WINDOWS)) + } +} + +val example2 = project(p) { + name = "example2" + directory = "example" + + exec { + commandLine(listOf("cmd", "/c", "echo", "Test Example 2"), os = setOf(Os.WINDOWS)) + commandLine(listOf("echo", "Test example 2"), os = setOf(Os.LINUX)) + //commandLine(listOf("cmd", "/c", "tasklist | find \"cmd.exe\""), os = setOf(Os.WINDOWS), fail = setOf(Fail.NONE)) + commandLine(listOf("/bin/sh", "-c", "ps aux | grep bash"), os = setOf(Os.LINUX)) + } +} diff --git a/kobalt/wrapper/kobalt-wrapper.properties b/kobalt/wrapper/kobalt-wrapper.properties index 91fe49a..1ec9521 100644 --- a/kobalt/wrapper/kobalt-wrapper.properties +++ b/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=1.0.3 \ No newline at end of file +kobalt.version=1.0.5 \ No newline at end of file From 4171f5bb39fe4a87a8c28c5a29784a9fd36ad12f Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Wed, 8 Mar 2017 11:19:40 -0800 Subject: [PATCH 22/52] Kobalt 1.0.6 update. --- .idea/kobalt.xml | 2 +- .../kobalt/wrapper/kobalt-wrapper.properties | 2 +- kobalt-exec.iml | 754 +++++++++--------- kobalt/Build.kt.iml | 18 +- kobalt/src/Build.kt | 14 +- kobalt/wrapper/kobalt-wrapper.properties | 2 +- 6 files changed, 397 insertions(+), 395 deletions(-) diff --git a/.idea/kobalt.xml b/.idea/kobalt.xml index 52b4669..5bc4181 100644 --- a/.idea/kobalt.xml +++ b/.idea/kobalt.xml @@ -5,7 +5,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -418,18 +49,387 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kobalt/Build.kt.iml b/kobalt/Build.kt.iml index c6d6e39..4bbec09 100644 --- a/kobalt/Build.kt.iml +++ b/kobalt/Build.kt.iml @@ -18,6 +18,15 @@ + + + + + + + + + @@ -27,14 +36,5 @@ - - - - - - - - - \ No newline at end of file diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index e931620..9a1903d 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -12,16 +12,18 @@ import org.apache.maven.model.Developer import org.apache.maven.model.License import org.apache.maven.model.Model import org.apache.maven.model.Scm +import java.io.File val semver = "0.6.3" val bs = buildScript { - val f = java.io.File("kobaltBuild/libs/kobalt-exec-$semver.jar") - val p = if (f.exists()) { - kobaltLog(1, " >>> Using: ${f.path}") - file(f.path) - } else { - "net.thauvin.erik:kobalt-exec:" + val p = with(File("kobaltBuild/libs/kobalt-exec-$semver.jar")) { + if (exists()) { + kobaltLog(1, " >>> Using: $path") + file(path) + } else { + "net.thauvin.erik:kobalt-exec:" + } } plugins("net.thauvin.erik:kobalt-versioneye:", p) } diff --git a/kobalt/wrapper/kobalt-wrapper.properties b/kobalt/wrapper/kobalt-wrapper.properties index 1ec9521..f3cd7d1 100644 --- a/kobalt/wrapper/kobalt-wrapper.properties +++ b/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=1.0.5 \ No newline at end of file +kobalt.version=1.0.6 \ No newline at end of file From 816dcd8843bfa98f2ae5cd0932b3efdd644ae51d Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Wed, 8 Mar 2017 12:19:43 -0800 Subject: [PATCH 23/52] Updated license copyright. --- LICENSE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.txt b/LICENSE.txt index 84fe1dc..f30d392 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2016, Erik C. Thauvin (erik@thauvin.net) +Copyright (c) 2016-2017, Erik C. Thauvin (erik@thauvin.net) All rights reserved. Redistribution and use in source and binary forms, with or without From ece42cb69f52ded03eac3469ac560f5be1912775 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Wed, 8 Mar 2017 13:16:02 -0800 Subject: [PATCH 24/52] Updated scopes. --- .idea/scopes/Copyright.xml | 3 + .idea/scopes/Source.xml | 3 - kobalt-exec.iml | 782 ++++++++++++++++++------------------- kobalt/Build.kt.iml | 18 +- 4 files changed, 403 insertions(+), 403 deletions(-) create mode 100644 .idea/scopes/Copyright.xml delete mode 100644 .idea/scopes/Source.xml diff --git a/.idea/scopes/Copyright.xml b/.idea/scopes/Copyright.xml new file mode 100644 index 0000000..e487d4e --- /dev/null +++ b/.idea/scopes/Copyright.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/scopes/Source.xml b/.idea/scopes/Source.xml deleted file mode 100644 index d4fb9bf..0000000 --- a/.idea/scopes/Source.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/kobalt-exec.iml b/kobalt-exec.iml index 0573f36..b9f476d 100644 --- a/kobalt-exec.iml +++ b/kobalt-exec.iml @@ -21,397 +21,10 @@ - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -427,9 +40,396 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kobalt/Build.kt.iml b/kobalt/Build.kt.iml index 4bbec09..1bd660b 100644 --- a/kobalt/Build.kt.iml +++ b/kobalt/Build.kt.iml @@ -18,15 +18,6 @@ - - - - - - - - - @@ -36,5 +27,14 @@ + + + + + + + + + \ No newline at end of file From 8788ee465854c08bbcb156735de0e8bacf43ac0a Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 21 Mar 2017 15:17:08 -0700 Subject: [PATCH 25/52] Updated to Kobalt 1.0.19. --- .gitattributes | 7 ++++--- .idea/kobalt.xml | 2 +- kobalt-exec.iml | 2 +- kobalt/wrapper/kobalt-wrapper.properties | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitattributes b/.gitattributes index 92d2493..6ec2ae2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,5 @@ -# Normalize line endings in text files to LF on checkin. -# (this overrides core.autocrlf) - +# Set the default behavior, in case people don't have core.autocrlf set. * text=auto + +# batch files are specific to windows and always crlf +*.bat eol=crlf diff --git a/.idea/kobalt.xml b/.idea/kobalt.xml index 5bc4181..48dce39 100644 --- a/.idea/kobalt.xml +++ b/.idea/kobalt.xml @@ -5,7 +5,7 @@ \ No newline at end of file diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index 73ec2ce..76b95c2 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -1,25 +1,13 @@ -import com.beust.kobalt.* -import com.beust.kobalt.misc.* -import com.beust.kobalt.plugin.application.* -import com.beust.kobalt.plugin.packaging.* -import com.beust.kobalt.plugin.publish.* -import net.thauvin.erik.kobalt.plugin.exec.* -import net.thauvin.erik.kobalt.plugin.versioneye.* -import org.apache.maven.model.* -import java.io.* -val semver = "0.6.3" +import com.beust.kobalt.* +import com.beust.kobalt.plugin.packaging.assemble +import com.beust.kobalt.plugin.publish.autoGitTag +import com.beust.kobalt.plugin.publish.bintray +import net.thauvin.erik.kobalt.plugin.versioneye.versionEye +import org.apache.maven.model.* val bs = buildScript { - val p = with(File("kobaltBuild/libs/kobalt-exec-$semver.jar")) { - if (exists()) { - kobaltLog(1, " >>> Using: $path") - file(path) - } else { - "net.thauvin.erik:kobalt-exec:" - } - } - plugins("net.thauvin.erik:kobalt-versioneye:", p) + plugins("net.thauvin.erik:kobalt-versioneye:") } val dev by profile() @@ -30,7 +18,7 @@ val p = project { name = "kobalt-exec" group = "net.thauvin.erik" artifactId = name - version = semver + version = "0.6.4" pom = Model().apply { description = "Command Line Execution plug-in for the Kobalt build system." @@ -57,7 +45,6 @@ val p = project { dependenciesTest { compile("org.testng:testng:") - } assemble { @@ -79,41 +66,4 @@ val p = project { org = "Thauvin" team = "Owners" } -} - -val example = project(p) { - - name = "example" - group = "com.example" - artifactId = name - version = "0.1" - directory = ("example") - - assemble { - jar { - } - } - - application { - mainClass = "com.example.Main" - } - - exec { - commandLine(listOf("echo", "Test Example 1"), os = setOf(Os.LINUX)) - commandLine(listOf("cmd", "/c", "echo", "Test Example 1"), os = setOf(Os.WINDOWS)) - commandLine(args = listOf("ls", "-l"), dir = "../libs", os = setOf(Os.LINUX)) - commandLine(args = listOf("cmd", "/c", "dir /Q"), dir = "../libs", os = setOf(Os.WINDOWS)) - } -} - -val example2 = project(p) { - name = "example2" - directory = "example" - - exec { - commandLine(listOf("cmd", "/c", "echo", "Test Example 2"), os = setOf(Os.WINDOWS)) - commandLine(listOf("echo", "Test example 2"), os = setOf(Os.LINUX)) - //commandLine(listOf("cmd", "/c", "tasklist | find \"cmd.exe\""), os = setOf(Os.WINDOWS), fail = setOf(Fail.NONE)) - commandLine(listOf("/bin/sh", "-c", "ps aux | grep bash"), os = setOf(Os.LINUX)) - } -} +} \ No newline at end of file diff --git a/kobalt/wrapper/kobalt-wrapper.properties b/kobalt/wrapper/kobalt-wrapper.properties index ab67089..5430a86 100644 --- a/kobalt/wrapper/kobalt-wrapper.properties +++ b/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=1.0.30 \ No newline at end of file +kobalt.version=1.0.69 \ No newline at end of file From a52cdc70798150e8d8feb50b18b3a1f1657de326 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 24 Apr 2017 14:19:30 -0700 Subject: [PATCH 34/52] Kobalt 1.0.75 update. --- example/kobalt/wrapper/kobalt-wrapper.properties | 2 +- kobalt/wrapper/kobalt-wrapper.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/kobalt/wrapper/kobalt-wrapper.properties b/example/kobalt/wrapper/kobalt-wrapper.properties index 5430a86..02e723d 100644 --- a/example/kobalt/wrapper/kobalt-wrapper.properties +++ b/example/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=1.0.69 \ No newline at end of file +kobalt.version=1.0.75 \ No newline at end of file diff --git a/kobalt/wrapper/kobalt-wrapper.properties b/kobalt/wrapper/kobalt-wrapper.properties index 5430a86..02e723d 100644 --- a/kobalt/wrapper/kobalt-wrapper.properties +++ b/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=1.0.69 \ No newline at end of file +kobalt.version=1.0.75 \ No newline at end of file From 079d8877f1c12f5393050c5a1bd897194400ae38 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 24 Apr 2017 14:19:53 -0700 Subject: [PATCH 35/52] Prep for 0.6.5 release. --- .gitignore | 1 + example/kobalt/src/Build.kt | 2 +- kobalt/src/Build.kt | 9 ++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e236f57..173de82 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ **/.idea/tasks.xml **/.idea/workspace.xml *.iws +*.sublime-* .classpath .DS_Store .gradle diff --git a/example/kobalt/src/Build.kt b/example/kobalt/src/Build.kt index a1c5abf..f3372f2 100644 --- a/example/kobalt/src/Build.kt +++ b/example/kobalt/src/Build.kt @@ -8,7 +8,7 @@ import net.thauvin.erik.kobalt.plugin.exec.* // ./kobaltw example2:exec --log 2 val bs = buildScript { - //plugins(file("../kobaltBuild/libs/kobalt-exec-0.6.4.jar")) + //repos(file("K:/maven/repository")) plugins("net.thauvin.erik:kobalt-exec:") } diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index 76b95c2..79929cc 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -7,7 +7,8 @@ import net.thauvin.erik.kobalt.plugin.versioneye.versionEye import org.apache.maven.model.* val bs = buildScript { - plugins("net.thauvin.erik:kobalt-versioneye:") + repos(file("K:/maven/repository")) + plugins("net.thauvin.erik:kobalt-versioneye:", "net.thauvin.erik:kobalt-maven-local:") } val dev by profile() @@ -18,7 +19,7 @@ val p = project { name = "kobalt-exec" group = "net.thauvin.erik" artifactId = name - version = "0.6.4" + version = "0.6.5" pom = Model().apply { description = "Command Line Execution plug-in for the Kobalt build system." @@ -48,7 +49,9 @@ val p = project { } assemble { - mavenJars {} + mavenJars { + fatJar = true + } } autoGitTag { From d990c6d5983008743ceae98ea385c656dc6f4c0b Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Fri, 28 Apr 2017 00:24:10 -0700 Subject: [PATCH 36/52] Added clean for testing. --- clean.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 clean.sh diff --git a/clean.sh b/clean.sh new file mode 100644 index 0000000..552252d --- /dev/null +++ b/clean.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +DEBUG=false + +rm="rm -rf" + +if [ "$DEBUG" = true ]; then + rm="echo rm -rf" +fi + +buildkt="kobalt/src/Build.kt" + +name=$(cat $buildkt | grep -m 1 "name = " | cut -d"\"" -f 2) +group=$(cat $buildkt | grep -m 1 "group = " | cut -d"\"" -f 2) + +if [ -z "$1" ]; then + version=$(cat $buildkt | grep -m 1 "version = " | cut -d"\"" -f 2) +else + version="$1" +fi + +maven="/k/maven/repository/${group//.//}/${name}/${version}" +kobalt="$HOME/.kobalt/cache/${group//.//}/${name}/${version}" +localRepo="$HOME/.kobalt/localMavenRepo/${group//.//}/${name}/${version}" + +read -p "Delete version ${version}? " -n 1 -r +echo +if [[ $REPLY =~ ^[Yy]$ ]]; then + for dir in "$kobalt" "$maven" "$localRepo"; do + if [ -d "$dir" ]; then + echo -e "Deleting : \e[32;1m$dir\e[0m" + $rm "$dir" + else + echo -e "Not Found: \e[31;1m$dir\e[0m" + fi + done +fi \ No newline at end of file From 395fa127b966610b86593be001c96d36ce8bc556 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Fri, 28 Apr 2017 00:26:04 -0700 Subject: [PATCH 37/52] Added taskName, dependsOn. Changed commandLine(args) from List to vararg. --- README.md | 62 ++++++++++++++----- example/kobalt/src/Build.kt | 38 +++++++----- kobalt/src/Build.kt | 14 +++-- .../erik/kobalt/plugin/exec/ExecPlugin.kt | 29 +++++---- 4 files changed, 97 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 6ee4f49..696bd73 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ val p = project { name = "example" exec { - commandLine(listOf("echo", "Hello, World!")) + commandLine("echo", "Hello, World!") } } ``` @@ -35,9 +35,9 @@ The `commandLine` directive is used to execute command line(s) during the build ```kotlin exec { - commandLine(listOf("cmd", "/c", "stop.bat"), dir = "../tomcat/bin", os = setOf(Os.WINDOWS)) - commandLine(listOf("./stop.sh"), dir = "../tomcat/bin", os = setOf(Os.MAC, Os.LINUX)) - commandLine(listOf("/bin/sh", "-c", "ps aux | grep tomcat"), fail = setOf(Fail.EXIT)) + commandLine("cmd", "/c", "stop.bat", dir = "../tomcat/bin", os = setOf(Os.WINDOWS)) + commandLine("./stop.sh", dir = "../tomcat/bin", os = setOf(Os.MAC, Os.LINUX)) + commandLine("/bin/sh", "-c", "ps aux | grep tomcat", fail = setOf(Fail.EXIT)) } ``` @@ -45,12 +45,13 @@ exec { ### `args` -The full command line including the executable and all parameters. +The full command line arguments including the executable and all parameters. ```kotlin exec { - commandLine(listOf("ls", "-l")) - commandLine(args = listOf("cmd", "/c", "dir /Q")) + commandLine(args="ls") + commandLine("ls", "-l") + commandLine("cmd", "/c", "dir /Q") } ``` @@ -60,7 +61,7 @@ The working directory in which the command should be executed. Defaults to the p ```kotlin exec { - commandLine(listOf("cmd", "/c", "stop.bat"), dir = "../tomcat/bin") + commandLine("cmd", "/c", "stop.bat", dir = "../tomcat/bin") commandLine("./stop.sh", dir = "../tomcat/bin") } ``` @@ -85,8 +86,8 @@ Name | Operating System ```kotlin exec { - commandLine(listOf("cmd", "/c", "stop.cmd"), os = setOf(Os.WINDOWS)) - commandLine(listOf("./stop.sh"), os = setOf(Os.LINUX, Os.MAC)) + commandLine("cmd", "/c", "stop.cmd", os = setOf(Os.WINDOWS)) + commandLine("./stop.sh", os = setOf(Os.LINUX, Os.MAC)) } ``` @@ -110,8 +111,41 @@ Name | Failure When ```kotlin exec { - commandLine(listOf("cmd", "/c", "stop.bat"), fail = setOf(Fail.EXIT)) - commandLine(listOf("./stop.sh"), fail = setOf(Fail.EXIT, Fail.STDOUT)) + commandLine("cmd", "/c", "stop.bat", fail = setOf(Fail.EXIT)) + commandLine("./stop.sh", fail = setOf(Fail.EXIT, Fail.STDOUT)) +} +``` + +## taskName + +Additionally, you can specify a task name to easily identify multiple `exec` directives. + +```kotlin +exec { + taskName = "start" + commandLine("./start.sh", os = setOf(Os.LINUX, Os.MAC)) +} + +exec { + taskName = "stop" + commandLine("./stop.sh", os = setOf(Os.LINUX, Os.MAC)) +} +``` + +```shell +./kobaltw start +./kobaltw stop +``` + +## dependsOn + + +By default the `exec` task depends on `assemble`, use the `dependsOn` parameter to change the dependencies: + +```kotlin +exec { + dependsOn = listOf("assemble", "run") + commandLine("cmd", "/c", "start.bat", fail = setOf(Fail.EXIT)) } ``` @@ -125,8 +159,8 @@ You could also redirect the error stream to a file: ```kotlin exec { - commandLine(listOf("/bin/sh", "-c", "./stop.sh 2> error.txt"), os = setOf(Os.LINUX)) - commandLine(listOf("cmd", "/c", "stop.bat 2> error.txt"), os = setOf(Os.WINDOWS)) + commandLine("/bin/sh", "-c", "./stop.sh 2> error.txt", os = setOf(Os.LINUX)) + commandLine("cmd", "/c", "stop.bat 2> error.txt", os = setOf(Os.WINDOWS)) } ``` diff --git a/example/kobalt/src/Build.kt b/example/kobalt/src/Build.kt index f3372f2..457ceac 100644 --- a/example/kobalt/src/Build.kt +++ b/example/kobalt/src/Build.kt @@ -3,13 +3,14 @@ import com.beust.kobalt.plugin.application.* import com.beust.kobalt.plugin.packaging.* import net.thauvin.erik.kobalt.plugin.exec.* +// ./kobaltw exec echo ps --log 2 // ./kobaltw exec --log 2 -// ./kobaltw example:exec --log 2 -// ./kobaltw example2:exec --log 2 +// ./kobaltw echo --log 2 +// ./kobaltw ps --log 2 val bs = buildScript { - //repos(file("K:/maven/repository")) - plugins("net.thauvin.erik:kobalt-exec:") + repos(file("K:/maven/repository")) + plugins("net.thauvin.erik:kobalt-exec:0.6.6") } val example = project { @@ -29,20 +30,23 @@ val example = project { } exec { - commandLine(listOf("echo", "Test Example 1"), os = setOf(Os.LINUX)) - commandLine(listOf("cmd", "/c", "echo", "Test Example 1"), os = setOf(Os.WINDOWS)) - commandLine(args = listOf("ls", "-l"), dir = "../libs", os = setOf(Os.LINUX)) - commandLine(args = listOf("cmd", "/c", "dir /Q"), dir = "../libs", os = setOf(Os.WINDOWS)) + commandLine("echo", "Test Example 1", os = setOf(Os.LINUX)) + commandLine("cmd", "/c", "echo", "Test Example 1", os = setOf(Os.WINDOWS)) + commandLine("ls", "-l", dir = "../libs", os = setOf(Os.LINUX)) + commandLine("cmd", "/c", "dir /Q", dir = "../libs", os = setOf(Os.WINDOWS)) } -} - -val example2 = project { - name = "example2" exec { - commandLine(listOf("cmd", "/c", "echo", "Test Example 2"), os = setOf(Os.WINDOWS)) - commandLine(listOf("echo", "Test example 2"), os = setOf(Os.LINUX)) - //commandLine(listOf("cmd", "/c", "tasklist | find \"cmd.exe\""), os = setOf(Os.WINDOWS), fail = setOf(Fail.NONE)) - commandLine(listOf("/bin/sh", "-c", "ps aux | grep bash"), os = setOf(Os.LINUX)) + taskName = "echo" + dependsOn = listOf("exec", "run") + commandLine("cmd", "/c", "echo", "Test Example 2", os = setOf(Os.WINDOWS)) + commandLine("echo", "Test example 2", os = setOf(Os.LINUX)) } -} + + exec { + taskName = "ps" + dependsOn = listOf() // no dependencies + commandLine("cmd", "/c", "tasklist | find \"cmd.exe\"", os = setOf(Os.WINDOWS), fail = setOf(Fail.NONE)) + commandLine("/bin/sh", "-c", "ps aux | grep bash", os = setOf(Os.LINUX)) + } +} \ No newline at end of file diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index 79929cc..121e8c0 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -1,10 +1,16 @@ -import com.beust.kobalt.* +import com.beust.kobalt.buildScript +import com.beust.kobalt.file import com.beust.kobalt.plugin.packaging.assemble import com.beust.kobalt.plugin.publish.autoGitTag import com.beust.kobalt.plugin.publish.bintray +import com.beust.kobalt.profile +import com.beust.kobalt.project import net.thauvin.erik.kobalt.plugin.versioneye.versionEye -import org.apache.maven.model.* +import org.apache.maven.model.Developer +import org.apache.maven.model.License +import org.apache.maven.model.Model +import org.apache.maven.model.Scm val bs = buildScript { repos(file("K:/maven/repository")) @@ -19,7 +25,7 @@ val p = project { name = "kobalt-exec" group = "net.thauvin.erik" artifactId = name - version = "0.6.5" + version = "0.6.6" pom = Model().apply { description = "Command Line Execution plug-in for the Kobalt build system." @@ -41,7 +47,7 @@ val p = project { } dependencies { - compile("com.beust:$kobaltDependency:") + compileOnly("com.beust:$kobaltDependency:") } dependenciesTest { 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 94eb440..066c695 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 @@ -44,8 +44,8 @@ import java.util.* import java.util.concurrent.TimeUnit @Singleton -class ExecPlugin @Inject constructor(val configActor: ConfigActor) : - BasePlugin(), ITaskContributor, IConfigActor by configActor { +class ExecPlugin @Inject constructor(val taskContributor: TaskContributor, val configActor: ConfigsActor) : + BasePlugin(), ITaskContributor, IConfigsActor by configActor { // ITaskContributor override fun tasksFor(project: Project, context: KobaltContext): List { return emptyList() @@ -57,14 +57,19 @@ class ExecPlugin @Inject constructor(val configActor: ConfigActor) : override val name = NAME - @Suppress("unused") - @Task(name = "exec", description = "Execute a command line process.") - fun taskExec(project: Project): TaskResult { - configurationFor(project)?.let { config -> - return executeCommands(project, config) + override fun apply(project: Project, context: KobaltContext) { + configurationFor(project)?.let { configs -> + configs.forEach { config -> + taskManager.addTask(this, project, config.taskName, + description = "Execute a command line process.", + group = "Other", + dependsOn = config.dependsOn, + task = { executeCommands(project, config) }) + taskContributor.addVariantTasks(this, project, context, config.taskName, + dependsOn = config.dependsOn, + runTask = { executeCommands(project, config) }) + } } - - return TaskResult() } private fun matchOs(os: Os): Boolean { @@ -187,12 +192,14 @@ data class CommandLine(var args: List = emptyList(), var dir: String = " @Directive class ExecConfig { + var taskName: String = "exec" val commandLines = arrayListOf() + var dependsOn = listOf("assemble") @Suppress("unused") - fun commandLine(args: List = emptyList(), dir: String = "", os: Set = emptySet(), + fun commandLine(vararg args: String, dir: String = "", os: Set = emptySet(), fail: Set = setOf(Fail.NORMAL)) { - if (args.isNotEmpty()) commandLines.add(CommandLine(args, dir, os, fail)) + if (args.isNotEmpty()) commandLines.add(CommandLine(listOf(*args), dir, os, fail)) } } From 9fb31c09e502977a6cd2c6ad18e184d627adeffd Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Fri, 28 Apr 2017 10:55:59 -0700 Subject: [PATCH 38/52] Added Cygwin, MinGW and MSYS support. --- README.md | 12 ++++++------ .../thauvin/erik/kobalt/plugin/exec/ExecPlugin.kt | 14 +++++++++++++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 696bd73..610c40f 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ exec { ### `args` -The full command line arguments including the executable and all parameters. +The full command line including the executable and all arguments. ```kotlin exec { @@ -74,9 +74,12 @@ The following predefined values are available: Name | Operating System --------------|----------------------- +`Os.CYGWIN` | Cygwin `Os.FREEBSD` | FreeBSD `Os.LINUX` | Linux `Os.MAC` | Apple Macintosh / OS X +`Os.MINGW` | Minimalist GNU for Windows +`OS.MSYS` | MSYS `Os.OPENVMS` | OpenVMS `Os.OS400` | OS/400 `Os.SOLARIS` | Solaris / SunOS @@ -118,7 +121,7 @@ exec { ## taskName -Additionally, you can specify a task name to easily identify multiple `exec` directives. +Additionally, you can specify a task name to easily identify multiple `exec` tasks. ```kotlin exec { @@ -162,7 +165,4 @@ exec { commandLine("/bin/sh", "-c", "./stop.sh 2> error.txt", os = setOf(Os.LINUX)) commandLine("cmd", "/c", "stop.bat 2> error.txt", os = setOf(Os.WINDOWS)) } -``` - - - +``` \ No newline at end of file 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 066c695..ac5f138 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 @@ -102,6 +102,18 @@ class ExecPlugin @Inject constructor(val taskContributor: TaskContributor, val c Os.OS400 -> { return curOs.contains("os/400") } + Os.CYGWIN -> { + val cygwin: String? = System.getenv("ORIGINAL_PATH") + return cygwin?.contains("/cygdrive/") ?: false + } + Os.MINGW -> { + val mingw: String? = System.getenv("MSYSTEM") + return mingw?.startsWith("MINGW") ?: false + } + Os.MSYS -> { + val msys: String? = System.getenv("MSYSTEM") + return msys?.startsWith("MSYS") ?: false + } } } @@ -184,7 +196,7 @@ enum class Fail { } enum class Os { - FREEBSD, LINUX, MAC, OPENVMS, OS400, SOLARIS, TANDEM, WINDOWS, ZOS + CYGWIN, FREEBSD, LINUX, MAC, MINGW, MSYS, OPENVMS, OS400, SOLARIS, TANDEM, WINDOWS, ZOS } data class CommandLine(var args: List = emptyList(), var dir: String = "", var os: Set = emptySet(), From 3007041be4dafe5897bab14e5fc68b8aa6b80047 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Fri, 28 Apr 2017 20:19:48 -0700 Subject: [PATCH 39/52] Cleaned up examples. --- README.md | 2 +- example/kobalt/src/Build.kt | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 610c40f..3fbfd9a 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ The full command line including the executable and all arguments. ```kotlin exec { - commandLine(args="ls") + commandLine(args = "ls") commandLine("ls", "-l") commandLine("cmd", "/c", "dir /Q") } diff --git a/example/kobalt/src/Build.kt b/example/kobalt/src/Build.kt index 457ceac..2858ecf 100644 --- a/example/kobalt/src/Build.kt +++ b/example/kobalt/src/Build.kt @@ -30,17 +30,19 @@ val example = project { } exec { - commandLine("echo", "Test Example 1", os = setOf(Os.LINUX)) - commandLine("cmd", "/c", "echo", "Test Example 1", os = setOf(Os.WINDOWS)) - commandLine("ls", "-l", dir = "../libs", os = setOf(Os.LINUX)) - commandLine("cmd", "/c", "dir /Q", dir = "../libs", os = setOf(Os.WINDOWS)) + commandLine("echo", "Test Example 1", os = setOf(Os.LINUX, Os.MINGW, Os.CYGWIN)) + commandLine("cmd", "/c", "echo", "Test", "Example", "1", os = setOf(Os.WINDOWS)) + commandLine("ls", "-l", dir = "../kobalt/wrapper", os = setOf(Os.LINUX, Os.MINGW, Os.CYGWIN)) + commandLine("cmd", "/c", "dir /Q", dir = "../kobalt/wrapper", os = setOf(Os.WINDOWS)) } exec { taskName = "echo" dependsOn = listOf("exec", "run") - commandLine("cmd", "/c", "echo", "Test Example 2", os = setOf(Os.WINDOWS)) - commandLine("echo", "Test example 2", os = setOf(Os.LINUX)) + + val echo = arrayOf("echo", "Test", "Example", "2") + commandLine("cmd", "/c", *echo, os = setOf(Os.WINDOWS)) + commandLine(*echo, os = setOf(Os.LINUX, Os.MINGW, Os.CYGWIN)) } exec { From 6530e8f7be41bb1ac2f3c650f1e9ff4ea79a71cc Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Fri, 28 Apr 2017 20:20:47 -0700 Subject: [PATCH 40/52] Kobalt 1.0.78 update. --- .idea/encodings.xml | 6 + .idea/inspectionProfiles/Project_Default.xml | 10 +- .idea/kobalt.xml | 4 +- .idea/kotlinc.xml | 7 - .idea/misc.xml | 115 ++++- .idea/modules.xml | 1 - .idea/vcs.xml | 2 - example/kobalt/Build.kt.iml | 31 -- .../kobalt/wrapper/kobalt-wrapper.properties | 2 +- kobalt-exec.iml | 403 +----------------- kobalt/Build.kt.iml | 17 +- kobalt/wrapper/kobalt-wrapper.properties | 2 +- 12 files changed, 141 insertions(+), 459 deletions(-) create mode 100644 .idea/encodings.xml delete mode 100644 .idea/kotlinc.xml delete mode 100644 example/kobalt/Build.kt.iml diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 17b1e81..8ff795e 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -1,9 +1,8 @@ diff --git a/.idea/kobalt.xml b/.idea/kobalt.xml index 07b6593..4a291e6 100644 --- a/.idea/kobalt.xml +++ b/.idea/kobalt.xml @@ -4,13 +4,15 @@ diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml deleted file mode 100644 index 1c24f9a..0000000 --- a/.idea/kotlinc.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index f1a9bb1..350d029 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,117 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Java + + + Portability issuesJava + + + + + Android + + + + + + + + + + + + + commons-logging-api + + + + + + + + 1.8.x + + + + + + + + 1.8.x + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index cc61fa9..48f8f9e 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -3,7 +3,6 @@ - diff --git a/.idea/vcs.xml b/.idea/vcs.xml index d175698..94a25f7 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -2,7 +2,5 @@ - - \ No newline at end of file diff --git a/example/kobalt/Build.kt.iml b/example/kobalt/Build.kt.iml deleted file mode 100644 index d022bf6..0000000 --- a/example/kobalt/Build.kt.iml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/example/kobalt/wrapper/kobalt-wrapper.properties b/example/kobalt/wrapper/kobalt-wrapper.properties index 02e723d..e945989 100644 --- a/example/kobalt/wrapper/kobalt-wrapper.properties +++ b/example/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=1.0.75 \ No newline at end of file +kobalt.version=1.0.80 \ No newline at end of file diff --git a/kobalt-exec.iml b/kobalt-exec.iml index d3359c4..78aa9b9 100644 --- a/kobalt-exec.iml +++ b/kobalt-exec.iml @@ -21,15 +21,6 @@ - - - - - - - - - @@ -39,402 +30,14 @@ - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/kobalt/Build.kt.iml b/kobalt/Build.kt.iml index db31b14..a3bb3a5 100644 --- a/kobalt/Build.kt.iml +++ b/kobalt/Build.kt.iml @@ -10,32 +10,33 @@ - + - + - + - + - + + + - + - + - \ No newline at end of file diff --git a/kobalt/wrapper/kobalt-wrapper.properties b/kobalt/wrapper/kobalt-wrapper.properties index 02e723d..e945989 100644 --- a/kobalt/wrapper/kobalt-wrapper.properties +++ b/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=1.0.75 \ No newline at end of file +kobalt.version=1.0.80 \ No newline at end of file From 43d55803a9c14ebb0fe3e3f88ed050993c1585fc Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sat, 29 Apr 2017 17:11:06 -0700 Subject: [PATCH 41/52] Changed Os.WINDOWS to no longer include Cygwin, MinGW or MSYS. --- README.md | 7 +++- example/kobalt/src/Build.kt | 6 +-- .../erik/kobalt/plugin/exec/ExecPlugin.kt | 38 +++++++++++++++---- 3 files changed, 37 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 3fbfd9a..ac86546 100644 --- a/README.md +++ b/README.md @@ -84,9 +84,11 @@ Name | Operating System `Os.OS400` | OS/400 `Os.SOLARIS` | Solaris / SunOS `Os.TANDEM` | Tandem's Non-Stop -`Os.WINDOWS` | Microsoft Windows +`Os.WINDOWS` | Microsoft Windows* `Os.ZOS` | z/OS / OS/390 +* Not including Cygwin, MinGW or MSYS. + ```kotlin exec { commandLine("cmd", "/c", "stop.cmd", os = setOf(Os.WINDOWS)) @@ -135,7 +137,7 @@ exec { } ``` -```shell +```sh ./kobaltw start ./kobaltw stop ``` @@ -155,6 +157,7 @@ exec { ## Logging / Debugging To view the output of the `exec` task, use: + ```sh ./kobaltw exec --log 2 ``` diff --git a/example/kobalt/src/Build.kt b/example/kobalt/src/Build.kt index 2858ecf..a9dfbb1 100644 --- a/example/kobalt/src/Build.kt +++ b/example/kobalt/src/Build.kt @@ -30,8 +30,6 @@ val example = project { } exec { - commandLine("echo", "Test Example 1", os = setOf(Os.LINUX, Os.MINGW, Os.CYGWIN)) - commandLine("cmd", "/c", "echo", "Test", "Example", "1", os = setOf(Os.WINDOWS)) commandLine("ls", "-l", dir = "../kobalt/wrapper", os = setOf(Os.LINUX, Os.MINGW, Os.CYGWIN)) commandLine("cmd", "/c", "dir /Q", dir = "../kobalt/wrapper", os = setOf(Os.WINDOWS)) } @@ -40,7 +38,7 @@ val example = project { taskName = "echo" dependsOn = listOf("exec", "run") - val echo = arrayOf("echo", "Test", "Example", "2") + val echo = arrayOf("echo", "Test", "Example") commandLine("cmd", "/c", *echo, os = setOf(Os.WINDOWS)) commandLine(*echo, os = setOf(Os.LINUX, Os.MINGW, Os.CYGWIN)) } @@ -49,6 +47,6 @@ val example = project { taskName = "ps" dependsOn = listOf() // no dependencies commandLine("cmd", "/c", "tasklist | find \"cmd.exe\"", os = setOf(Os.WINDOWS), fail = setOf(Fail.NONE)) - commandLine("/bin/sh", "-c", "ps aux | grep bash", os = setOf(Os.LINUX)) + commandLine("sh", "-c", "ps aux | grep bash", os = setOf(Os.LINUX, Os.MINGW, Os.CYGWIN)) } } \ No newline at end of file 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 ac5f138..d21bb39 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 @@ -76,7 +76,11 @@ class ExecPlugin @Inject constructor(val taskContributor: TaskContributor, val c val curOs: String = System.getProperty("os.name").toLowerCase(Locale.US) when (os) { Os.WINDOWS -> { - return curOs.contains("windows") + if (!isMinGW(any = true) && !isCygwin()) { + return curOs.contains("windows") + } else { + return false + } } Os.MAC -> { return (curOs.contains("mac") || curOs.contains("darwin") || curOs.contains("osx")) @@ -103,20 +107,38 @@ class ExecPlugin @Inject constructor(val taskContributor: TaskContributor, val c return curOs.contains("os/400") } Os.CYGWIN -> { - val cygwin: String? = System.getenv("ORIGINAL_PATH") - return cygwin?.contains("/cygdrive/") ?: false + return isCygwin() } Os.MINGW -> { - val mingw: String? = System.getenv("MSYSTEM") - return mingw?.startsWith("MINGW") ?: false + return isMinGW() } Os.MSYS -> { - val msys: String? = System.getenv("MSYSTEM") - return msys?.startsWith("MSYS") ?: false + return isMinGW(Os.MSYS) } } } + private fun isCygwin() : Boolean { + val path: String? = System.getenv("ORIGINAL_PATH") + return path?.contains("/cygdrive/") ?: false + } + + private fun isMinGW(os: Os = Os.MINGW, any: Boolean = false) : Boolean { + val msys: String? = System.getenv("MSYSTEM") + + if (!msys.isNullOrBlank()) { + if (any) { + return true + } else if (os.equals(Os.MSYS)) { + return msys!!.startsWith("MSYS") + } else if (os.equals(Os.MINGW)) { + return msys!!.startsWith("MINGW") + } + } + + return false + } + private fun executeCommands(project: Project, config: ExecConfig): TaskResult { var success = true val errorMessage = StringBuilder() @@ -132,7 +154,7 @@ class ExecPlugin @Inject constructor(val taskContributor: TaskContributor, val c } } if (execute) { - log(2, "> " + args.joinToString(" ")) + log(2, (if (!wrkDir.name.equals(".")) wrkDir.name else "") + "> " + args.joinToString(" ")) val pb = ProcessBuilder().command(args.toList()) pb.directory(wrkDir) val proc = pb.start() From a55d7f34eb98812615e1c5df45bb61fa73ffa1cc Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sat, 29 Apr 2017 18:55:11 -0700 Subject: [PATCH 42/52] Cleanup. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ac86546..8ed85eb 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ The `commandLine` directive is used to execute command line(s) during the build exec { commandLine("cmd", "/c", "stop.bat", dir = "../tomcat/bin", os = setOf(Os.WINDOWS)) commandLine("./stop.sh", dir = "../tomcat/bin", os = setOf(Os.MAC, Os.LINUX)) - commandLine("/bin/sh", "-c", "ps aux | grep tomcat", fail = setOf(Fail.EXIT)) + commandLine("sh", "-c", "ps aux | grep tomcat", fail = setOf(Fail.EXIT)) } ``` @@ -73,13 +73,13 @@ List of operating systems on which the command may be executed. If the current O The following predefined values are available: Name | Operating System ---------------|----------------------- -`Os.CYGWIN` | Cygwin +:-------------|:------------------------- +`Os.CYGWIN` | Cygwin for Windows `Os.FREEBSD` | FreeBSD `Os.LINUX` | Linux `Os.MAC` | Apple Macintosh / OS X `Os.MINGW` | Minimalist GNU for Windows -`OS.MSYS` | MSYS +`OS.MSYS` | MinGW Minimal System `Os.OPENVMS` | OpenVMS `Os.OS400` | OS/400 `Os.SOLARIS` | Solaris / SunOS @@ -91,7 +91,7 @@ Name | Operating System ```kotlin exec { - commandLine("cmd", "/c", "stop.cmd", os = setOf(Os.WINDOWS)) + commandLine("cmd", "/c", "stop.bat", os = setOf(Os.WINDOWS)) commandLine("./stop.sh", os = setOf(Os.LINUX, Os.MAC)) } ``` @@ -103,7 +103,7 @@ List of error options to specify whether data returned to the standard streams a The following predefined values are available: Name | Failure When ---------------|----------------------------------------------------------------- +:-------------|:---------------------------------------------------------------- `Fail.EXIT` | Exit value > 0 `Fail.NORMAL` | Exit value > 0 or any data to the standard error stream (stderr) `Fail.OUTPUT` | Any data to the standard output stream (stdout) or stderr. From 5672ad96b06ec684fca78db781e6cd1df7fca63c Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sat, 29 Apr 2017 23:05:22 -0700 Subject: [PATCH 43/52] Examples cleanup. --- README.md | 5 +++-- example/kobalt/src/Build.kt | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8ed85eb..527f34e 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,8 @@ The `commandLine` directive is used to execute command line(s) during the build exec { commandLine("cmd", "/c", "stop.bat", dir = "../tomcat/bin", os = setOf(Os.WINDOWS)) commandLine("./stop.sh", dir = "../tomcat/bin", os = setOf(Os.MAC, Os.LINUX)) - commandLine("sh", "-c", "ps aux | grep tomcat", fail = setOf(Fail.EXIT)) + commandLine("sh", "-c", "ps aux | grep tomcat", os = setOf(Os.MAC, Os.LINUX), fail = setOf(Fail.EXIT)) + commandLine("cmd", "/c", "tasklist | find \"tomcat\"", os = setOf(Os.WINDOWS), fail = setOf(Fail.EXIT)) } ``` @@ -165,7 +166,7 @@ You could also redirect the error stream to a file: ```kotlin exec { - commandLine("/bin/sh", "-c", "./stop.sh 2> error.txt", os = setOf(Os.LINUX)) + commandLine("sh", "-c", "./stop.sh 2> error.txt", os = setOf(Os.LINUX)) commandLine("cmd", "/c", "stop.bat 2> error.txt", os = setOf(Os.WINDOWS)) } ``` \ No newline at end of file diff --git a/example/kobalt/src/Build.kt b/example/kobalt/src/Build.kt index a9dfbb1..a6ae3f1 100644 --- a/example/kobalt/src/Build.kt +++ b/example/kobalt/src/Build.kt @@ -39,14 +39,14 @@ val example = project { dependsOn = listOf("exec", "run") val echo = arrayOf("echo", "Test", "Example") - commandLine("cmd", "/c", *echo, os = setOf(Os.WINDOWS)) commandLine(*echo, os = setOf(Os.LINUX, Os.MINGW, Os.CYGWIN)) + commandLine("cmd", "/c", *echo, os = setOf(Os.WINDOWS)) } exec { taskName = "ps" dependsOn = listOf() // no dependencies - commandLine("cmd", "/c", "tasklist | find \"cmd.exe\"", os = setOf(Os.WINDOWS), fail = setOf(Fail.NONE)) commandLine("sh", "-c", "ps aux | grep bash", os = setOf(Os.LINUX, Os.MINGW, Os.CYGWIN)) + commandLine("cmd", "/c", "tasklist | find \"cmd.exe\"", os = setOf(Os.WINDOWS), fail = setOf(Fail.EXIT)) } } \ No newline at end of file From 0531a8a13924c10ea933ed4b884159aacfebc7f0 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 30 Apr 2017 15:59:56 -0700 Subject: [PATCH 44/52] Formatting. --- .../erik/kobalt/plugin/exec/ExecPlugin.kt | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) 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 d21bb39..9dccff5 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 @@ -72,6 +72,27 @@ class ExecPlugin @Inject constructor(val taskContributor: TaskContributor, val c } } + private fun isCygwin(): Boolean { + val path: String? = System.getenv("ORIGINAL_PATH") + return path?.contains("/cygdrive/") ?: false + } + + private fun isMinGW(os: Os = Os.MINGW, any: Boolean = false): Boolean { + val msys: String? = System.getenv("MSYSTEM") + + if (!msys.isNullOrBlank()) { + if (any) { + return true + } else if (os.equals(Os.MSYS)) { + return msys!!.startsWith("MSYS") + } else if (os.equals(Os.MINGW)) { + return msys!!.startsWith("MINGW") + } + } + + return false + } + private fun matchOs(os: Os): Boolean { val curOs: String = System.getProperty("os.name").toLowerCase(Locale.US) when (os) { @@ -118,27 +139,6 @@ class ExecPlugin @Inject constructor(val taskContributor: TaskContributor, val c } } - private fun isCygwin() : Boolean { - val path: String? = System.getenv("ORIGINAL_PATH") - return path?.contains("/cygdrive/") ?: false - } - - private fun isMinGW(os: Os = Os.MINGW, any: Boolean = false) : Boolean { - val msys: String? = System.getenv("MSYSTEM") - - if (!msys.isNullOrBlank()) { - if (any) { - return true - } else if (os.equals(Os.MSYS)) { - return msys!!.startsWith("MSYS") - } else if (os.equals(Os.MINGW)) { - return msys!!.startsWith("MINGW") - } - } - - return false - } - private fun executeCommands(project: Project, config: ExecConfig): TaskResult { var success = true val errorMessage = StringBuilder() From 182b975b85cd5466584863e506ae103e6fd566e2 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 30 Apr 2017 16:12:49 -0700 Subject: [PATCH 45/52] Clarified Os.WINDOWS exclusions. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 527f34e..bce8adc 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ Name | Operating System `Os.WINDOWS` | Microsoft Windows* `Os.ZOS` | z/OS / OS/390 -* Not including Cygwin, MinGW or MSYS. +* Excluding Cygwin, MinGW and MSYS. ```kotlin exec { From b0e025206bf8412856a4c022a81e938855a4ba81 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 30 Apr 2017 16:14:03 -0700 Subject: [PATCH 46/52] Version 0.7.0 --- example/kobalt/src/Build.kt | 4 ++-- kobalt/src/Build.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/kobalt/src/Build.kt b/example/kobalt/src/Build.kt index a6ae3f1..16bf56d 100644 --- a/example/kobalt/src/Build.kt +++ b/example/kobalt/src/Build.kt @@ -9,8 +9,8 @@ import net.thauvin.erik.kobalt.plugin.exec.* // ./kobaltw ps --log 2 val bs = buildScript { - repos(file("K:/maven/repository")) - plugins("net.thauvin.erik:kobalt-exec:0.6.6") + //repos(file("K:/maven/repository")) + plugins("net.thauvin.erik:kobalt-exec:") } val example = project { diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index 121e8c0..2b2d815 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -25,7 +25,7 @@ val p = project { name = "kobalt-exec" group = "net.thauvin.erik" artifactId = name - version = "0.6.6" + version = "0.7.0" pom = Model().apply { description = "Command Line Execution plug-in for the Kobalt build system." From dc99641c3ecefd1e6274d7ae4b7613d8f19939da Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 29 May 2017 18:36:40 -0700 Subject: [PATCH 47/52] Kobalt 1.0.86 update. --- .idea/kobalt.xml | 2 +- .idea/misc.xml | 51 -- .../kobalt/wrapper/kobalt-wrapper.properties | 2 +- kobalt-exec.iml | 643 +++++++++++++++++- kobalt/Build.kt.iml | 22 +- kobalt/wrapper/kobalt-wrapper.properties | 2 +- 6 files changed, 655 insertions(+), 67 deletions(-) diff --git a/.idea/kobalt.xml b/.idea/kobalt.xml index 4a291e6..c71b85c 100644 --- a/.idea/kobalt.xml +++ b/.idea/kobalt.xml @@ -6,7 +6,7 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -39,5 +75,608 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kobalt/Build.kt.iml b/kobalt/Build.kt.iml index a3bb3a5..0098d0a 100644 --- a/kobalt/Build.kt.iml +++ b/kobalt/Build.kt.iml @@ -18,17 +18,6 @@ - - - - - - - - - - - @@ -38,5 +27,16 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/kobalt/wrapper/kobalt-wrapper.properties b/kobalt/wrapper/kobalt-wrapper.properties index e945989..cdcb2d1 100644 --- a/kobalt/wrapper/kobalt-wrapper.properties +++ b/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=1.0.80 \ No newline at end of file +kobalt.version=1.0.86 \ No newline at end of file From 9d5b969dd951eb1415854e0672e4e05b5c70525f Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 29 May 2017 18:37:13 -0700 Subject: [PATCH 48/52] Added circleci configuration. --- README.md | 2 +- circle.yml | 11 +++++++++++ example/kobalt/src/Build.kt | 2 +- kobalt/src/Build.kt | 8 +++++--- 4 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 circle.yml diff --git a/README.md b/README.md index bce8adc..1c891a0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Command Line Execution plug-in for [Kobalt](http://beust.com/kobalt/home/index.html) -[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](http://opensource.org/licenses/BSD-3-Clause) [![Build Status](https://travis-ci.org/ethauvin/kobalt-exec.svg?branch=master)](https://travis-ci.org/ethauvin/kobalt-exec) [![Download](https://api.bintray.com/packages/ethauvin/maven/kobalt-exec/images/download.svg)](https://bintray.com/ethauvin/maven/kobalt-exec/_latestVersion) +[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](http://opensource.org/licenses/BSD-3-Clause) [![Build Status](https://travis-ci.org/ethauvin/kobalt-exec.svg?branch=master)](https://travis-ci.org/ethauvin/kobalt-exec) [![CircleCI](https://circleci.com/gh/ethauvin/kobalt-exec/tree/master.svg?style=shield)](https://circleci.com/gh/ethauvin/kobalt-exec/tree/master) [![Download](https://api.bintray.com/packages/ethauvin/maven/kobalt-exec/images/download.svg)](https://bintray.com/ethauvin/maven/kobalt-exec/_latestVersion) The plug-in allows for the execution of system commands, similarly to the [Gradle Exec](https://docs.gradle.org/current/dsl/org.gradle.api.tasks.Exec.html) or [Ant Exec](https://ant.apache.org/manual/Tasks/exec.html) tasks. diff --git a/circle.yml b/circle.yml new file mode 100644 index 0000000..0351b69 --- /dev/null +++ b/circle.yml @@ -0,0 +1,11 @@ +machine: + java: + version: oraclejdk8 + +dependencies: + override: + - chmod +x kobaltw + +test: + override: + - ./kobaltw assemble \ No newline at end of file diff --git a/example/kobalt/src/Build.kt b/example/kobalt/src/Build.kt index 16bf56d..76e2c24 100644 --- a/example/kobalt/src/Build.kt +++ b/example/kobalt/src/Build.kt @@ -9,7 +9,7 @@ import net.thauvin.erik.kobalt.plugin.exec.* // ./kobaltw ps --log 2 val bs = buildScript { - //repos(file("K:/maven/repository")) + repos(localMaven()) plugins("net.thauvin.erik:kobalt-exec:") } diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index 2b2d815..60461c7 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -1,5 +1,5 @@ - import com.beust.kobalt.buildScript +import com.beust.kobalt.localMaven import com.beust.kobalt.file import com.beust.kobalt.plugin.packaging.assemble import com.beust.kobalt.plugin.publish.autoGitTag @@ -13,7 +13,7 @@ import org.apache.maven.model.Model import org.apache.maven.model.Scm val bs = buildScript { - repos(file("K:/maven/repository")) + repos(localMaven()) plugins("net.thauvin.erik:kobalt-versioneye:", "net.thauvin.erik:kobalt-maven-local:") } @@ -47,11 +47,13 @@ val p = project { } dependencies { - compileOnly("com.beust:$kobaltDependency:") + compile("com.beust:$kobaltDependency:") + compile("org.jetbrains.kotlin:kotlin-stdlib:1.1.2-4") } dependenciesTest { compile("org.testng:testng:") + compile("org.jetbrains.kotlin:kotlin-test:1.1.2-4") } assemble { From 49a01d258667cd0c5f6fe76d33611097de3457b1 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 30 May 2017 15:12:46 -0700 Subject: [PATCH 49/52] Added release badge. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1c891a0..342ad10 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Command Line Execution plug-in for [Kobalt](http://beust.com/kobalt/home/index.html) -[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](http://opensource.org/licenses/BSD-3-Clause) [![Build Status](https://travis-ci.org/ethauvin/kobalt-exec.svg?branch=master)](https://travis-ci.org/ethauvin/kobalt-exec) [![CircleCI](https://circleci.com/gh/ethauvin/kobalt-exec/tree/master.svg?style=shield)](https://circleci.com/gh/ethauvin/kobalt-exec/tree/master) [![Download](https://api.bintray.com/packages/ethauvin/maven/kobalt-exec/images/download.svg)](https://bintray.com/ethauvin/maven/kobalt-exec/_latestVersion) +[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](http://opensource.org/licenses/BSD-3-Clause) [![release](http://github-release-version.herokuapp.com/github/ethauvin/kobalt-exec/release.svg?style=flat)](https://github.com/ethauvin/kobalt-exec/releases/latest) [![Build Status](https://travis-ci.org/ethauvin/kobalt-exec.svg?branch=master)](https://travis-ci.org/ethauvin/kobalt-exec) [![CircleCI](https://circleci.com/gh/ethauvin/kobalt-exec/tree/master.svg?style=shield)](https://circleci.com/gh/ethauvin/kobalt-exec/tree/master) [![Download](https://api.bintray.com/packages/ethauvin/maven/kobalt-exec/images/download.svg)](https://bintray.com/ethauvin/maven/kobalt-exec/_latestVersion) The plug-in allows for the execution of system commands, similarly to the [Gradle Exec](https://docs.gradle.org/current/dsl/org.gradle.api.tasks.Exec.html) or [Ant Exec](https://ant.apache.org/manual/Tasks/exec.html) tasks. From 38d7714f22c2781bd9eeb32d02e46701d6761de5 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 31 Oct 2017 16:16:54 -0700 Subject: [PATCH 50/52] Kobalt 1.0.90, TestNG 6.12 updates. --- example/kobalt/wrapper/kobalt-wrapper.properties | 2 +- kobalt/src/Build.kt | 7 ++++--- kobalt/wrapper/kobalt-wrapper.properties | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/example/kobalt/wrapper/kobalt-wrapper.properties b/example/kobalt/wrapper/kobalt-wrapper.properties index cdcb2d1..a6a4316 100644 --- a/example/kobalt/wrapper/kobalt-wrapper.properties +++ b/example/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=1.0.86 \ No newline at end of file +kobalt.version=1.0.90 diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index 60461c7..7a5bf23 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -48,12 +48,12 @@ val p = project { dependencies { compile("com.beust:$kobaltDependency:") - compile("org.jetbrains.kotlin:kotlin-stdlib:1.1.2-4") + compile("org.jetbrains.kotlin:kotlin-stdlib:1.1.51") } dependenciesTest { - compile("org.testng:testng:") - compile("org.jetbrains.kotlin:kotlin-test:1.1.2-4") + compile("org.testng:testng:6.12") + compile("org.jetbrains.kotlin:kotlin-test:1.1.51") } assemble { @@ -64,6 +64,7 @@ val p = project { autoGitTag { enabled = true + push = false message = "Version $version" } diff --git a/kobalt/wrapper/kobalt-wrapper.properties b/kobalt/wrapper/kobalt-wrapper.properties index cdcb2d1..a6a4316 100644 --- a/kobalt/wrapper/kobalt-wrapper.properties +++ b/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=1.0.86 \ No newline at end of file +kobalt.version=1.0.90 From a2bbaf9f0f8fb7b9dc7993b00440e343cd8ccb4b Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 31 Oct 2017 16:17:14 -0700 Subject: [PATCH 51/52] Added CircleCI 2.0 configuration. --- .circleci/config.yml | 31 +++++++++++++++++++++++++++++++ circle.yml | 11 ----------- 2 files changed, 31 insertions(+), 11 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 circle.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..dffffe6 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,31 @@ +version: 2 +jobs: + build: + docker: + - image: circleci/openjdk:8-jdk + + working_directory: ~/repo + + environment: + JVM_OPTS: -Xmx3200m + TERM: dumb + + steps: + - checkout + - restore_cache: + keys: + - kobalt-dependencies-{{ checksum "kobalt/src/Build.kt" }} + # fallback to using the latest cache if no exact match is found + - kobalt-dependencies- + + - run: + name: Check Versions + command: ./kobaltw checkVersions + + - save_cache: + paths: ~/.kobalt + key: kobalt-dependencies-{{ checksum "kobalt/src/Build.kt" }} + + - run: + name: Assemble + command: ./kobaltw assemble \ No newline at end of file diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 0351b69..0000000 --- a/circle.yml +++ /dev/null @@ -1,11 +0,0 @@ -machine: - java: - version: oraclejdk8 - -dependencies: - override: - - chmod +x kobaltw - -test: - override: - - ./kobaltw assemble \ No newline at end of file From acb492b30e4ae913cef59072dae0bc90d0c67880 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 18 Jun 2018 20:13:08 -0700 Subject: [PATCH 52/52] Fixed badges. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 342ad10..7081070 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Command Line Execution plug-in for [Kobalt](http://beust.com/kobalt/home/index.html) -[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](http://opensource.org/licenses/BSD-3-Clause) [![release](http://github-release-version.herokuapp.com/github/ethauvin/kobalt-exec/release.svg?style=flat)](https://github.com/ethauvin/kobalt-exec/releases/latest) [![Build Status](https://travis-ci.org/ethauvin/kobalt-exec.svg?branch=master)](https://travis-ci.org/ethauvin/kobalt-exec) [![CircleCI](https://circleci.com/gh/ethauvin/kobalt-exec/tree/master.svg?style=shield)](https://circleci.com/gh/ethauvin/kobalt-exec/tree/master) [![Download](https://api.bintray.com/packages/ethauvin/maven/kobalt-exec/images/download.svg)](https://bintray.com/ethauvin/maven/kobalt-exec/_latestVersion) +[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](http://opensource.org/licenses/BSD-3-Clause) [![release](https://img.shields.io/github/release/ethauvin/kobalt-exec.svg)](https://github.com/ethauvin/kobalt-exec/releases/latest) [![Build Status](https://travis-ci.org/ethauvin/kobalt-exec.svg?branch=master)](https://travis-ci.org/ethauvin/kobalt-exec) [![CircleCI](https://circleci.com/gh/ethauvin/kobalt-exec/tree/master.svg?style=shield)](https://circleci.com/gh/ethauvin/kobalt-exec/tree/master) [![Download](https://api.bintray.com/packages/ethauvin/maven/kobalt-exec/images/download.svg)](https://bintray.com/ethauvin/maven/kobalt-exec/_latestVersion) The plug-in allows for the execution of system commands, similarly to the [Gradle Exec](https://docs.gradle.org/current/dsl/org.gradle.api.tasks.Exec.html) or [Ant Exec](https://ant.apache.org/manual/Tasks/exec.html) tasks.