Kotlin M2 Candidate

It’s been seven weeks since Kotlin M1 release, and I’m happy to invite you to try out a candidate build of Kotlin M2! This post gives an overview of the upcoming milestone release along with come usage instructions.

Thank you, M1!

Our M1 build did a pretty good job: got about 800 downloads, and brought extensive feedback in our forum and issue tracker.

Seems like you have had some fun with it, and we are aiming at even more fun :)

What’s new

Little Things

As usual, it’s been a lot of bugs fixed. I’d like to point out that we are working on the IDE performance. It has been somewhat improved in M2, and will get to its real speed by the next milestone.

Language Features

Kotlin now respects visibility modifiers. We have four of them:

  • privateprotectedpublic — as usual,
  • internal — visible inside a module (that is more than a package).

You can now pass an array of values to a vararg-function:

fun printAll(vararg a : String) {
    for (item in a) println(item)

fun main(args: Array<String>) {
    printAll("one", "two")

The spread operator “converts” an array into a vararg-list. Unlike Java, this does not present any ugly corner-cases.

There will a few more nice things shortly.

JavaScript Support in the IDE

While you can still play with Kotlin directly in your browser with Kotlin Web Demo, there’s now a real IDE for Kotlin compiled to JavaScript.

When you install the M2 Candidate build of the IntelliJ IDEA plugin, follow these instructions to try out some Kotlin-to-JS compilation:

  • Check out kotlin-js-hello project from github
  • Open it as an IntelliJ IDEA project
  • Set it up as a Kotlin-JS project
  • Select your favorite browser and run. The result will open in the browser.
  • Have fun editing the JavaScript file as you like and re-running…

Currently, the API documentation is only being prepared. Meanwhile, you can study Kotlin’s JS APIs here.


After fixing some bugs and finding out a lot of interesting stuff (special thanks to Aleksandro Eterverda), we are ready to run Kotlin on Android!

Some other Kotlin programs running on Android:

How to Install the Candidate Build

As usual, your feedback is very welcome. Have a nice Kotlin!


Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.
image description