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.

Maven Incremental Compilation

Since Kotlin 1.1.2, incremental compilation which was previously available for IntelliJ IDEA and Gradle builds is now supported for Maven. To enable, set the kotlin.compiler.incremental property to true, using either the -D command line argument or the properties tag:

Maven Annotation Processing

Kotlin’s annotation processing tool, kapt, can now be invoked from Maven builds. Just add an execution of the kapt goal from kotlin-maven-plugin before compile:

Here is a complete example of the POM file with Java-Kotlin code support and tests.

Please note that kapt is still not supported for IntelliJ IDEA’s own build system. Launch the build from the “Maven Projects” toolbar whenever you want to re-run the annotation processing.

Inline Method Refactoring

We’ve finally implemented the support for Inline Method (Function) in Kotlin code.

Other IDE Improvements

A large percentage of our efforts in the 1.1.x timeframe is dedicated to improving the performance of the IntelliJ IDEA plugin. We’re releasing several major performance improvements, affecting primarily typing responsiveness, in 1.1.2, and we already have additional major improvements in the pipeline for the 1.1.3 release.

Beyond that, as usual, we’ve implemented a large number of new inspections, quickfixes and small IDE features in this release. Specifically worth mentioning are the support for folding Android String resource references in the editor, as well as new quickfixes for dealing with Android API version issues.

How to update

To update the plugin, use Tools | Kotlin | Configure Kotlin Plugin Updates and press the “Check for updates now” button. Also, don’t forget to update the compiler and standard library version in your Maven and Gradle build scripts.

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!

This entry was posted in Releases. Bookmark the permalink.

21 Responses to Kotlin 1.1.2 is out

  1. Pingback: Интересные материалы для Android-разработчика #68 - Подкасты Android Dev

  2. Omar Assadi says:

    Glad to hear kapt works on Maven now! Not having built-in support was what finally made me switch to Gradle, actually.

  3. Bagičan K. says:

    Is possible to write a simple shared library (platform-independent) and use it in JVM project and also in JavaScript project?
    Thanks for answer.

    • Dmitry Jemerov says:

      We’re working on a set of features to enable this, and we plan to announce them in one of the future releases of Kotlin.

      • Bagičan K. says:

        Thanks for reply. Great! It would be very huge improvement for development experience.

      • David R. says:

        Can you clarify if this is somehow different than the Kotlin JS effort? Because our team is considering utilizing that for a similar concept of writing a simple shared library in Kotlin that could also used used in our JS client code.

        • Dmitry Jemerov says:

          This is different, yes. We will support multiplatform libraries that will contain both shared code and code specific to different platforms.

  4. Pingback: Kotlin 1.1.2 发布,基于 JVM 的编程语言 | News Pod

  5. Suresh says:

    When will gradle plugin get updated (https://plugins.gradle.org/search?term=org.jetbrains) ? It’s showing as 1.1.2-test-2.

  6. Chrisitan says:

    This minor release introduces breaking changes and hence doesn’t follow semantic versioning. Why are version numbers used as if they were expensive? Version numbers are so cheap these days! 😉

  7. Arild J. says:

    Aw yeah, I’ve really been missing that Inline Method intent!

  8. Pingback: Kotlin 1.1.2 erschienen: Gute Nachrichten für Maven-Nutzer - JAXenter

  9. ov7a says:

    You have a bug in your pie chart: “bug fixes” label is upside down :)

  10. Jerry Destremps says:

    Can’t update Android Studio. All my co-workers are getting the same error for the past couple of days:

    2017-04-27 17:47:40,940 [112178768] WARN – Settings.impl.PluginDownloader – Cannot download ‘http://plugins.jetbrains.com/pluginManager/?action=download&id=org.jetbrains.kotlin&build=AI-162.2228.14&uuid=fea061f2-e20e-47da-a230-b1374ea9f287’: Read timed out
    , response: 200 OK
    java.io.IOException: Cannot download ‘http://plugins.jetbrains.com/pluginManager/?action=download&id=org.jetbrains.kotlin&build=AI-162.2228.14&uuid=fea061f2-e20e-47da-a230-b1374ea9f287’: Read timed out
    , response: 200 OK
    at com.intellij.util.io.HttpRequests$RequestImpl.saveToFile(HttpRequests.java:345)
    at com.intellij.openapi.updateSettings.impl.PluginDownloader$1.process(PluginDownloader.java:242)
    at com.intellij.openapi.updateSettings.impl.PluginDownloader$1.process(PluginDownloader.java:239)
    at com.intellij.util.io.HttpRequests.doProcess(HttpRequests.java:389)
    at com.intellij.util.io.HttpRequests.process(HttpRequests.java:383)
    at com.intellij.util.io.HttpRequests.access$100(HttpRequests.java:56)
    at com.intellij.util.io.HttpRequests$RequestBuilderImpl.connect(HttpRequests.java:244)
    at com.intellij.openapi.updateSettings.impl.PluginDownloader.downloadPlugin(PluginDownloader.java:239)
    at com.intellij.openapi.updateSettings.impl.PluginDownloader.prepareToInstall(PluginDownloader.java:142)
    at org.jetbrains.kotlin.idea.KotlinPluginUpdater$installPluginUpdate$2.run(KotlinPluginUpdater.kt:245)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:635)
    at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:170)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:494)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:155)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:128)
    at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:307)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
    at java.net.SocketInputStream.read(SocketInputStream.java:170)
    at java.net.SocketInputStream.read(SocketInputStream.java:141)
    at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
    at sun.security.ssl.InputRecord.readV3Record(InputRecord.java:593)
    at sun.security.ssl.InputRecord.read(InputRecord.java:532)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
    at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:930)
    at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:284)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
    at sun.net.www.MeteredStream.read(MeteredStream.java:134)
    at java.io.FilterInputStream.read(FilterInputStream.java:133)
    at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3336)
    at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3329)
    at com.intellij.util.net.NetUtils.copyStreamContent(NetUtils.java:191)
    at com.intellij.util.io.HttpRequests$RequestImpl.saveToFile(HttpRequests.java:341)
    … 22 more

  11. I am unable to compile with Kotlin 1.1.2-3 in Android Studio. I get this error:

    Caused by: java.lang.NoSuchMethodError: com.android.build.gradle.internal.variant.BaseVariantData.getOutputs()Ljava/util/List;
    16:19:00.058 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.jetbrains.kotlin.gradle.plugin.KotlinAndroidPlugin.tryGetSingleArtifact(KotlinPlugin.kt:522)
    16:19:00.058 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.jetbrains.kotlin.gradle.plugin.KotlinAndroidPlugin.processVariantData(KotlinPlugin.kt:492)
    16:19:00.058 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.jetbrains.kotlin.gradle.plugin.KotlinAndroidPlugin.access$processVariantData(KotlinPlugin.kt:335)
    16:19:00.058 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.jetbrains.kotlin.gradle.plugin.KotlinAndroidPlugin$apply$2.execute(KotlinPlugin.kt:379)
    16:19:00.058 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.jetbrains.kotlin.gradle.plugin.KotlinAndroidPlugin$apply$2.execute(KotlinPlugin.kt:335)
    16:19:00.058 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:91)
    16:19:00.058 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:80)
    16:19:00.058 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42)
    16:19:00.058 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230)
    16:19:00.058 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149)
    16:19:00.059 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58)
    16:19:00.059 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] … 83 more
    16:19:00.059 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
    16:19:00.059 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
    16:19:00.059 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 1s
    16:19:00.060 [DEBUG] [org.jetbrains.kotlin.gradle.plugin.KotlinGradleBuildServices] [KOTLIN] Skipping kotlin cleanup since compiler wasn’t called
    16:19:00.060 [DEBUG] [org.jetbrains.kotlin.gradle.plugin.KotlinGradleBuildServices] [KOTLIN] Disposed KotlinGradleBuildServices

    • Dmitry Jemerov says:

      If you’re using Android build tools version 3.0.0-alpha1, you need to update your Kotlin version to 1.1.2-4.

Comments are closed.