Supports definition of per-project Kobalt tasks (similar to Ant targets) and execution of Ant tasks.
The primary goal is support migration of Ant builds to Kobalt. You can use built-it Ant tasks in Kobalt. Or define functions to use your custom Ant tasks.
val bs = buildScript {
plugins("com.devcharly:kobalt-ant:")
}
val project = project {
antTask("hello") {
echo("Hello World")
}
antTask("copy-dir1-to-dir2") {
mkdir("dir2")
copy(todir = "dir2") {
fileset(dir = "dir1")
include(name = "**/*.txt")
}
}
}
Kobalt's incremental tasks are supported:
val bs = buildScript {
plugins("com.devcharly:kobalt-ant:")
}
val project = project {
antTask("copy-dir1-to-dir2",
inputFiles = arrayOf("dir1"),
outputFiles = arrayOf("dir2")
) {
mkdir("dir2")
copy(todir = "dir2") {
fileset(dir = "dir1")
include(name = "**/*.txt")
}
}
}
See Kotlin Ant DSL
Kobalt 1.0.100 or later