Kotlin on Android. Now official

Today, at the Google I/O keynote, the Android team announced first-class support for Kotlin. We believe this is a great step for Kotlin, and fantastic news for Android developers as well as the rest of our community. We’re thrilled with the opportunities this opens up.

For Android developers, Kotlin support is a chance to use a modern and powerful language, helping solve common headaches such as runtime exceptions and source code verbosity. Kotlin is easy to get started with and can be gradually introduced into existing projects, which means that your existing skills and technology investments are preserved.

Kotlin for Android
Continue reading

Posted in Android | Tagged | 121 Comments

New Style for User Groups

Since we’ve launched the Kotlin community support program at the beginning of 2017, the number of user groups has grown to 45+ and 2-4 new user groups are joining us every month. To find one at your location, please, check the full list at the community section of kotlinlang.org.

Today we present the Kotlin user groups logo and a profile picture.

Kotlin User Group Logo

Continue reading

Posted in community | Tagged , | 7 Comments

Kotlin/Native v0.2 is out

We’re happy to announce the release of Kotlin/Native v0.2, a feature and bugfix update to Kotlin/Native Technology Preview. This update adds support for coroutines and cross-module inline functions support, along with bugfixes and improvements all over the place.

This release includes samples showing how to use coroutines for concurrent non-blocking IO, a GUI application using GTK, as well as a TensorFlow machine learning framework client contributed by Julius Kunze. Continue reading

Posted in Releases | Tagged , | 16 Comments

Kotlin 1.1.2 is out

We’re happy to announce the release of Kotlin 1.1.2, the second bugfix and tooling update for Kotlin 1.1. The update brings performance improvements to the compiler and the IntelliJ IDEA plugin, several new features in the tools, and lots of bugfixes in all areas. Kotlin 1.1.2 also brings compatibility with version 2.4.0-alpha of the Android Gradle plugin.

The complete list of changes in this release can be found in the changelog.

We’d like to thank our external contributors whose pull requests were included in this release: Yoshinori Isogai, Jonathan Leitschuh and Kirill Rakhman. Thanks to everyone who tried the EAP builds and sent us feedback, too!

Migration Notes

The Kotlin compiler now requires JDK 8 to run. You shouldn’t notice any changes, because most other Java development tools such as Gradle and the Android toolchain also require JDK 8, so you almost certainly already have it installed. For code generated by the compiler, Java 1.6 compatibility is still the default, and we have no plans to drop support for generating Java 1.6 compatible bytecode.

An object can no longer be declared inside an inner class. Such an object would be able to access the outer class instance, which is conceptually impossible because an object is always a singleton. inner sealed class’es are also prohibited. This is a temporary limitation which will be removed when we add the possibility to declare a subclass of an inner sealed class inside its outer class, and not inside the inner class itself. (KT-16232, KT-16233)

Using a declaration with a name consisting entirely of underscore characters now always requires backticks. (KT-16264)

Starting with this update, the Kotlin plugin no longer supports IntelliJ IDEA 2016.1. The plugin supports all IntelliJ IDEA versions starting from 2016.2, as well as all Android Studio versions starting from 2.2.

Continue reading

Posted in Releases | 21 Comments

Use Kotlin with npm, webpack and react

With Kotlin 1.1, targeting JavaScript in the Kotlin compiler has officially reached production-ready status. Of course, having compiler support is not enough to be able to solve real-life problems, so we continue our work on integrating Kotlin into the larger JavaScript ecosystem.

Today, we’d like to present two new projects: a Gradle plugin integrating Kotlin with npm, webpack and karma, and a full-stack application sample with a Kotlin/JVM backend and a Kotlin/JS frontend built with React.

Kotlin Frontend Plugin

The Kotlin frontend plugin allows you to build and deploy a Kotlin frontend application using webpack. You can use npm packages as dependencies of your application, and the plugin will take care of downloading them and bundling them into the resulting JS file. The plugin also integrates with Karma, allowing you to run the tests of your application. And for optimal workflow, the plugin supports continuous compilation and hot reload, ensuring that you always see an up-to-date version of your application in the browser.

The README file gives instructions for using the plugin, and the examples directory contains a simple example showing how you can apply it in a real project.

Kotlin React Example

Thinkter is an example of a modern full-stack application built in Kotlin. The backend runs under Jetty and uses Ktor, a Kotlin Web application framework developed by the Kotlin team. The frontend uses React; a set of React wrappers for Kotlin is provided as part of the project. You’re welcome to use the wrappers in your project and adapt them to your own needs. Note that we’re working on evolving the React wrappers internally, and we’re considering releasing them as a separate open-source library.

To see what Kotlin React code looks like, you can check out one of the components of the application.

Your feedback on these releases is very much welcome! Please file issues on GitHub, stop by the forums, or join the #javascript channel on the Kotlin Slack.

Posted in JavaScript | 22 Comments

Kotlin 1.1 Event Report

The Kotlin 1.1 release was warmly met by the community. To demonstrate the new features in Kotlin 1.1, JetBrains offered an online event. All those interested were able to watch a live stream of Andrey Breslav’s demo presentation and get their questions answered during a Q&A session.

This motivated many local communities to meet up: more than 30 user groups hosted events in 21 countries.

You can find the full list of the events at the Kotlin community web page. Over 3000 people joined the broadcast on the day of the event.

The recording of the demo presentation and the Q&A is available on YouTube:

Continue reading

Posted in Events | Tagged | 13 Comments

Kotlin 1.1 is also for Android Developers

Antonio Leiva
This is a guest blog post from Antonio Leiva — Android engineer, trainer and author of the “Kotlin for Android Developers” book.

We’re all really excited about the release of Kotlin 1.1. The new features this release includes are extremely useful for Java developers and lead JVM development to a new world of possibilities.

But these new features, such as coroutines, or type aliases (to put a couple of examples), look like science fiction for Android developers.

We’re still stuck in an ancient Java 6 with little improvements that forces us to develop in ways almost forgotten for most developers in any other platforms.

So a sane question would be: has the Kotlin team been able to keep compatibility to Java 6 while bringing all these new features alive? And the answer is: of course!

All the new stuff is still available for Java 6 and, as an extension, for Android developers. And today, I want to show you some of them, and how they can make your life even easier when developing Android Apps.

Continue reading

Posted in Android, guestpost | Tagged | 16 Comments

Kotlin/Native Tech Preview: Kotlin without a VM

We are happy to announce the first Technology Preview of Kotlin/Native that compiles Kotlin directly to machine code. The Kotlin/Native compiler produces standalone executables that can run without any virtual machine.

It is not a fully functional release yet, but you can already play with the technology and take a look at its source code here. The compiler is available under the Apache 2 OSS license.

KotlinNative
Continue reading

Posted in Releases, Roadmap | Tagged , | 92 Comments

Kotlin 1.1 Event in Your City

We are holding the Kotlin 1.1 event on March 23. Tune in to the live stream at JetBrains TV and see Andrey Breslav’s demo presentation about the key features of Kotlin 1.1, including coroutines, JavaScript back-end and more.

Start tweeting your questions today and get answers during the Q&A session live stream on March 23. Use the hashtag #kotlinqa.

We hold 2 live streams to accommodate different time zones. See the detailed schedule and guidelines in the blogpost.

Check if there is a Kotlin 1.1 event in your city. If you don’t find a local community event, join the live stream individually.

Kotlin_1_1event_map

Please note that the time of the live stream for the US has been changed to PDT time. The first live stream will start at 9 am PDT and the second at 11 am PDT.

Posted in Uncategorized | 1 Comment

Kotlin 1.0.7 is out

We’re happy to announce that Kotlin 1.0.7, the last update in the Kotlin 1.0.x series, is out. The main focus of this update is to backport the fixes related to Gradle and annotation processing so that they become available to those who can’t upgrade to version 1.1 at this time. The complete list of fixes is available in the changelog.

To use the new version in your Maven or Gradle builds, simply change the Kotlin version number in your build scripts. The command-line compiler can be downloaded from the Github release page.

In IntelliJ IDEA and Android Studio, we recommend to use the 1.1 version of the plugin, and to switch the language version to 1.0 if you’re using Kotlin 1.0.7 to build your project. If you do want to install the version 1.0.7 of the plugin, you can do so by downloading the version for your IDE from the Kotlin plugin Web site and using the “Install plugin from disk…” button.

As usual, if you run into any problems with the new release, you’re welcome to ask for help on the forums, on Slack (get an invite here), or to report issues in the issue tracker.

Let’s Kotlin!

Posted in Releases | 1 Comment