Select Git revision
contributing.md
After you've reviewed these contribution guidelines, you'll be all set to
contribute to this project.
ProjectHelper.kt 545 B
import org.gradle.api.Project
import java.io.ByteArrayOutputStream
import java.util.*
fun Project.cmd(vararg command: String) = try {
val stdOut = ByteArrayOutputStream()
exec {
commandLine(*command)
standardOutput = stdOut
}
stdOut.toString(Charsets.UTF_8.name()).trim()
} catch (e: Throwable) {
e.printStackTrace()
null
}
fun Project.properties(fileName: String): Properties? {
val file = file(fileName)
if (!file.exists())
return null
val props = Properties()
props.load(file.inputStream())
return props
}