Made Fail.NORMAL default.
This commit is contained in:
parent
ec778764ae
commit
0e1d0a3833
6 changed files with 82 additions and 8 deletions
5
.idea/kobalt.xml
generated
5
.idea/kobalt.xml
generated
|
@ -6,6 +6,11 @@
|
||||||
<option name="autoDownloadKobalt" value="true" />
|
<option name="autoDownloadKobalt" value="true" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
<option name="kobaltHome" value="$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.847" />
|
<option name="kobaltHome" value="$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.847" />
|
||||||
|
<option name="modules">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
<option name="useAutoImport" value="true" />
|
<option name="useAutoImport" value="true" />
|
||||||
</KobaltProjectSettings>
|
</KobaltProjectSettings>
|
||||||
</option>
|
</option>
|
||||||
|
|
1
.idea/modules.xml
generated
1
.idea/modules.xml
generated
|
@ -3,6 +3,7 @@
|
||||||
<component name="ProjectModuleManager">
|
<component name="ProjectModuleManager">
|
||||||
<modules>
|
<modules>
|
||||||
<module fileurl="file://$PROJECT_DIR$/kobalt/Build.kt.iml" filepath="$PROJECT_DIR$/kobalt/Build.kt.iml" />
|
<module fileurl="file://$PROJECT_DIR$/kobalt/Build.kt.iml" filepath="$PROJECT_DIR$/kobalt/Build.kt.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/kobalt-exec.iml" filepath="$PROJECT_DIR$/kobalt-exec.iml" />
|
||||||
</modules>
|
</modules>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -4,7 +4,10 @@ import com.beust.kobalt.plugin.application.*
|
||||||
import com.beust.kobalt.plugin.java.*
|
import com.beust.kobalt.plugin.java.*
|
||||||
import net.thauvin.erik.kobalt.plugin.exec.*
|
import net.thauvin.erik.kobalt.plugin.exec.*
|
||||||
|
|
||||||
val pl = plugins(file("../kobaltBuild/libs/kobalt-exec-0.1.jar"))
|
val repos = repos("https://dl.bintray.com/ethauvin/maven/")
|
||||||
|
|
||||||
|
//val pl = plugins(file("../kobaltBuild/libs/kobalt-exec-0.5.0-beta.jar"))
|
||||||
|
val pl = plugins("net.thauvin.erik:kobalt-exec:0.5.1-beta")
|
||||||
|
|
||||||
val p = project {
|
val p = project {
|
||||||
|
|
||||||
|
@ -37,7 +40,7 @@ val p = project {
|
||||||
}
|
}
|
||||||
|
|
||||||
exec {
|
exec {
|
||||||
commandLine(args = listOf("ls", "-l"), dir = "../libs", fail = setOf(Fail.NORMAL))
|
commandLine(listOf("cmd", "/c", "echo", "Test"), os = setOf("Win"))
|
||||||
commandLine(listOf("cmd", "/c", "echo", "Test"), os = listOf("Win", "Windows"), fail = setOf(Fail.NORMAL))
|
commandLine(args = listOf("ls", "-l"), dir = "../libs", os = setOf("Linux", "Win"))
|
||||||
}
|
}
|
||||||
}
|
}
|
64
kobalt-exec.iml
Normal file
64
kobalt-exec.iml
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module external.linked.project.id="kobalt-exec" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="KOBALT" type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||||
|
<output url="file://$MODULE_DIR$/kobaltBuild/classes" />
|
||||||
|
<output-test url="file://$MODULE_DIR$/kobaltBuild/test-classes" />
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/main/kotlin" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/test/kotlin" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/kobaltBuild" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module-library">
|
||||||
|
<library name="Kobalt: com.beust:kobalt-plugin-api:jar:0.842">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$USER_HOME$/.kobalt/repository/com/beust/kobalt-plugin-api/0.842/kobalt-plugin-api-0.842.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
|
<orderEntry type="module-library" scope="TEST">
|
||||||
|
<library name="Kobalt: org.apache.ant:ant:jar:1.7.0">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$USER_HOME$/.kobalt/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
|
<orderEntry type="module-library" scope="TEST">
|
||||||
|
<library name="Kobalt: com.beust:jcommander:jar:1.48">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$USER_HOME$/.kobalt/repository/com/beust/jcommander/1.48/jcommander-1.48.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
|
<orderEntry type="module-library" scope="TEST">
|
||||||
|
<library name="Kobalt: org.beanshell:bsh:jar:2.0b4">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$USER_HOME$/.kobalt/repository/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
|
<orderEntry type="module-library" scope="TEST">
|
||||||
|
<library name="Kobalt: org.apache.ant:ant-launcher:jar:1.7.0">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$USER_HOME$/.kobalt/repository/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
|
</component>
|
||||||
|
</module>
|
|
@ -17,7 +17,7 @@ val p = project {
|
||||||
name = "kobalt-exec"
|
name = "kobalt-exec"
|
||||||
group = "net.thauvin.erik"
|
group = "net.thauvin.erik"
|
||||||
artifactId = name
|
artifactId = name
|
||||||
version = "0.5.0-beta"
|
version = "0.5.1-beta"
|
||||||
|
|
||||||
pom = Model().apply {
|
pom = Model().apply {
|
||||||
name = project.name
|
name = project.name
|
||||||
|
@ -61,6 +61,6 @@ val p = project {
|
||||||
}
|
}
|
||||||
|
|
||||||
bintray {
|
bintray {
|
||||||
publish = false
|
publish = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,13 +147,14 @@ enum class Fail() {
|
||||||
}
|
}
|
||||||
|
|
||||||
data class CommandLine(var args: List<String> = emptyList(), var dir: String = "",
|
data class CommandLine(var args: List<String> = emptyList(), var dir: String = "",
|
||||||
var os: List<String> = emptyList(), var fail: Set<Fail> = emptySet())
|
var os: Set<String> = emptySet(), var fail: Set<Fail> = setOf(Fail.NORMAL))
|
||||||
|
|
||||||
data class ExecConfig(val project: Project) {
|
data class ExecConfig(val project: Project) {
|
||||||
val commandLines = arrayListOf<CommandLine>()
|
val commandLines = arrayListOf<CommandLine>()
|
||||||
|
|
||||||
@Directive fun commandLine(args: List<String> = emptyList(), dir: String = "", os: List<String> = emptyList(),
|
@Directive
|
||||||
fail: Set<Fail> = emptySet()) {
|
fun commandLine(args: List<String> = emptyList(), dir: String = "", os: Set<String> = emptySet(),
|
||||||
|
fail: Set<Fail> = setOf(Fail.NORMAL)) {
|
||||||
if (args.size > 0) commandLines.add(CommandLine(args, dir, os, fail))
|
if (args.size > 0) commandLines.add(CommandLine(args, dir, os, fail))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue