Property File Plug-in for Kobalt

<1 min read

I've published a new plug-in for Cédric's Kobalt build system based on Kotlin.

The PropertyFile plug-in provides an optional task for editing property files. It is inspired by the ant PropertyFile task.

import net.thauvin.erik.kobalt.plugin.propertyfile.*

val bs = buildScript {
    plugins("net.thauvin.erik:kobalt-property-file:")
}

val p = project {
    name = "example"

    propertyFile {
       file = "version.properties"
       comment = "##Generated file - do not modify!"
       entry(key = "product.build.major", value = "3")
       entry(key = "product.build.minor", type = Types.INT, operation = Operations.ADD)
       entry(key = "product.build.patch", value = "0")
       entry(key = "product.build.date" , type = Types.DATE, value = "now")
    }
}

Documentation and source are on GitHub.