Skip to content

Instantly share code, notes, and snippets.

View markusthoemmes's full-sized avatar

Markus Thömmes markusthoemmes

View GitHub Profile
@markusthoemmes
markusthoemmes / build.groovy
Last active June 3, 2017 12:53
A gradle script to build Kotlin based projects.
buildscript {
ext.kotlin_version = '1.1.2-2'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
@markusthoemmes
markusthoemmes / Hello.kt
Created June 3, 2017 12:52
A Kotlin based action for OpenWhisk
import com.google.gson.JsonObject
fun main(args : JsonObject): JsonObject {
val name = args["name"].asString
val response = JsonObject()
response.addProperty("message", "Hello $name!")
return response
}
@markusthoemmes
markusthoemmes / Hello.kt
Created June 3, 2017 12:51
A Kotlin based action for OpenWhisk
import com.google.gson.JsonObject
import com.github.salomonbrys.kotson.*
fun main(args : JsonObject): JsonObject {
val name = args["name"].string
return jsonObject(
"message" to "Hello $name!"
)
}