This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
ext.kotlin_version = '1.1.2-2' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!" | |
) | |
} |
NewerOlder