open class PrintHerokuVersion : Exec() {
init {
this.workingDir = project.rootDir
this.commandLine("/snap/bin/heroku", "-v")
this.standardOutput = ByteArrayOutputStream()
}
}
project.tasks.register<PrintHerokuVersion>("printHerokuVersion")
project.tasks.withType<PrintHerokuVersion> {
doLast { logger.info(standardOutput.toString()) }
}