Kotlin is the new type-inferred hotness in the world of JVM languages giving you a single unified language for building Android, server-side and even JavaScript apps. If you’re a Java developer then giving Kotlin a spin is simple.

Video: How to Send and Receive SMS messages with Kotlin

But you can’t copy the code from the video, so you can download it from here or just follow along below:

Getting started with Kotlin on the Server

We’ll be using IntelliJ and Gradle for dependency management throughout this article. With a few extra steps you should also be able to use a different IDE and dependency manager.

In IntelliJ create a new Gradle project and add Kotlin (Java) as the library.



We will call this project TwilioKotlin and choose a package structure for our project. I usually use my own reversed domain as follows:



In “Project Name” leave it as TwilioKotlin and on the next screen make sure you check the “create directories for empty content roots automatically”

Click “next” again and choose a suitable location to store the project. I usually store my Kotlin projects under ~/Projects/Kotlin/ .

Click “Finish” and your project will be generated.