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.
Posted in Android
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!
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.
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.
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.
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.
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.