Cleaned up examples.
This commit is contained in:
parent
9fb31c09e5
commit
3007041be4
2 changed files with 9 additions and 7 deletions
|
@ -49,7 +49,7 @@ The full command line including the executable and all arguments.
|
||||||
|
|
||||||
```kotlin
|
```kotlin
|
||||||
exec {
|
exec {
|
||||||
commandLine(args="ls")
|
commandLine(args = "ls")
|
||||||
commandLine("ls", "-l")
|
commandLine("ls", "-l")
|
||||||
commandLine("cmd", "/c", "dir /Q")
|
commandLine("cmd", "/c", "dir /Q")
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,17 +30,19 @@ val example = project {
|
||||||
}
|
}
|
||||||
|
|
||||||
exec {
|
exec {
|
||||||
commandLine("echo", "Test Example 1", os = setOf(Os.LINUX))
|
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("cmd", "/c", "echo", "Test", "Example", "1", os = setOf(Os.WINDOWS))
|
||||||
commandLine("ls", "-l", dir = "../libs", os = setOf(Os.LINUX))
|
commandLine("ls", "-l", dir = "../kobalt/wrapper", os = setOf(Os.LINUX, Os.MINGW, Os.CYGWIN))
|
||||||
commandLine("cmd", "/c", "dir /Q", dir = "../libs", os = setOf(Os.WINDOWS))
|
commandLine("cmd", "/c", "dir /Q", dir = "../kobalt/wrapper", os = setOf(Os.WINDOWS))
|
||||||
}
|
}
|
||||||
|
|
||||||
exec {
|
exec {
|
||||||
taskName = "echo"
|
taskName = "echo"
|
||||||
dependsOn = listOf("exec", "run")
|
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 {
|
exec {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue