Kotlin 1.1.60 is out

We’re happy to announce the release of Kotlin 1.1.60, a new bugfix and tooling update for Kotlin 1.1. This update: Adds experimental support for Kotlin/JS incremental compilation Adds new features to JSR-305 custom nullability annotations support Brings a lot of bug fixes in the automatic Parcelable implementation generator and provides it with IDE support Improves […]

Read More

What Are Delegated Properties in Kotlin?

Delegated Properties are regular properties who delegate how they are either written or read (think getters or setters) to some other function. For example, let’s say we have the following class. class Dog { var isAGoodDoggo: Boolean = true } Now we all know that ALL dogs are good dogs, so let’s say we want isAGoodDoggo to […]

Read More

Kotlin/Native IDE Support Preview

Kotlin/Native is a brand new technology that compiles Kotlin directly to machine code and produces executables that can run without a virtual machine. At KotlinConf 2017, we announced a preview release of development tools for Kotlin/Native. While we have IntelliJ IDEA for working with Kotlin, Kotlin/Native integrates with technologies from the native world such as […]

Read More

KotlinConf Keynote Recap

Today is a great day for the Kotlin community. KotlinConf, the inaugural Kotlin conference, opens today, and we’re really impressed that around 1200 attendees from all over the world have joined us in San Francisco. During the conference keynote, Andrey Breslav, the lead designer of Kotlin, has announced a few major developments around Kotlin, and […]

Read More

Kotlin Coroutines and Why They Are Necessary

Kotlin coroutines are very useful. In this article we will go through basic examples of using coroutines, and we will also examine what happens under the hood. Why are solutions like Coroutines necessary? Handling execution on multiple threads is unavoidable in modern application development. Drawing fancy loaders on the UI while waiting for a network […]

Read More

Kotlin 1.2 Beta2 is out

We’re happy to announce the second Beta release for Kotlin 1.2. In this release, we’ve been mostly focusing on smaller internal changes and on adding some missing pieces to our multiplatform project story. We’d like to thank Andrey Mischenko, Francesco Vasco, Jake Wharton, Jonathan Leitschuh, Kirill Rakhman, Pap Lorinc, Paul Merlin, Raluca Sauciuc, Toshiaki Kameyama, […]

Read More

How do I run a Kotlin class on command line?

I can’t run a compiled Kotlin class. When I try to run it like I would a normal Java class I get the following: C:\Users\User\Desktop>java _DefaultPackage Exception in thread “main” java.lang.NoClassDefFoundError: jet/runtime/Intrinsics at _DefaultPackage.main(Finder.kt) Caused by: java.lang.ClassNotFoundException: jet.runtime.Intrinsics at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) … 1 […]

Read More

Things to Know about Kotlin Extension Functions

How many times have you wished there was a simpler way to add just a small piece of functionality to a class in Java? Whenever that happened, you might have ended up either extending the class or utility static method. Both works fine, but it feels like there should be something more convenient, right? If […]

Read More

Inline Kotlin Properties

You can inline properties in Kotlin? Why is this useful? Let’s take a trivial Android example: val View.isVisible get() = visibility == View.VISIBLE That’s a simple yet convenient helper that hides the comparison operation behind a Boolean property, making your code look like this: if (button.isVisible) { Toast.makeText(context, “I’m a button!”, Toast.LENGTH_SHORT).show() } isVisible is actually an extension property, […]

Read More

Kotlin 1.2 Beta is out

We’re happy to announce the Beta release for Kotlin 1.2. With this release, we’re unveiling the major new feature of Kotlin 1.2 – experimental support for multiplatform projects. Also, the language and standard library are now feature complete – all the new features planned for Kotlin 1.2 have been implemented. Now is a great time […]

Read More