Kotlin 1.0.2 is Here

We’re happy to announce the release of Kotlin 1.0.2, the second bugfix and tooling update for Kotlin. In addition to compiler and language bugfixes, Kotlin 1.0.2 adds a number of major features to the IDE and the build tools.

Incremental Compilation in Gradle and the IDE

The new release continues our work on Kotlin incremental compilation support, speeding up the turnaround time during development. Incremental compilation in the IDE (which was previously marked as experimental) is now enabled by default. Also, the long-awaited support for incremental compilation in Gradle builds is now there.

To enable incremental compilation for Gradle, you need to set the kotlin.incremental property to true (for example, by adding the line kotlin.incremental=true to the file in the root directory of your project).

Android Lint Checks

Kotlin 1.0.2 introduces support for Android Lint checks for Kotlin code, ensuring that issues like using the API not available in the Android version you’re targeting are correctly detected.

The set of checks supported in Kotlin 1.0.2 corresponds to the checks supported in Android Studio 1.5; checks added or improved in Android Studio 2.0 will be supported in the next release of Kotlin. Also, the current version runs Lint checks for Kotlin code only inside the IDE (as part of on-the-fly code inspections, or in batch mode through Analyze | Inspect Code). Running checks from the command line will be supported in the next release.

Compact Standard Library

One other improvement relevant for Android developers is that the size of the standard library has been reduced by ~1500 methods (from approximately 6600 to 5100). Even before this change, the library was smaller than those of Kotlin’s main competitors, and now the situation is even better. Of course, the library is still fully binary compatible.

Java 7/8 Support Libraries

As a temporary workaround for better Java 7/8 support before full support is introduced in Kotlin 1.1, we’re now providing support libraries that expose the APIs added in Java 7 and 8 (such as the Stream API) as extension functions on Kotlin standard library classes. See the forum post for instructions on using the libraries.

IntelliJ IDEA Plugin features

The IntelliJ IDEA plugin has gained a number of major new features:

  • For users of Android Studio, there’s now a possibility to create a new activity in Kotlin;
  • For users of IntelliJ IDEA Ultimate, there is now initial support for the Spring Framework, including inspections, line markers, SpEL language injection support, actions to generate dependencies, and more;
  • A bunch of inspections and quickfixes have been added, such as an inspection for highlighting vars that can be val;
  • Improvements to Gradle integration, debugger, formatter, refactorings and other areas of the plugin.

JavaScript support

We’ve resumed work on our JavaScript backend, and the version 1.0.2 fills in most of the remaining gaps in the language feature support when targeting JavaScript. Newly supported features include nested classes, local classes, non-local returns in local lambdas, unsafe casts and more.

Maven Archetype

We’re now providing a Maven archetype to easily create Kotlin projects. Use “New project | Maven | Create from Archetype…” in IntelliJ IDEA, or the following command line:

mvn archetype:generate -Dfilter=org.jetbrains.kotlin:

Dokka 0.9.8

Together with Kotlin 1.0.2, we’re releasing a new version of Dokka, the Kotlin documentation generation tool. If you’re using Dokka in your project, you need to upgrade Dokka together with Kotlin, because older Dokka versions are incompatible with Kotlin 1.0.2. New features in Dokka 0.9.8 include:

  • Android Gradle plugin, for generating documentation for Android libraries and applications;
  • Support for generating a javadoc jar file in the Maven plugin.


You can see the full list of bugfixes and changes to the compiler, standard library and the tools in the changelog.

While working on the release, we received a lot of valuable feedback from the users of the Early Access Preview builds. We’re really grateful to everyone who has provided feedback, and we welcome you to join the EAP program for future updates.

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.

Comments below can no longer be edited.

21 Responses to Kotlin 1.0.2 is Here

  1. Avatar

    Simophin says:

    May 13, 2016

    Congratulations! Can’t wait to try out incremental compilation!

  2. Avatar

    mintori says:

    May 13, 2016

    Another great release. Thanks!

  3. Avatar

    soywiz says:

    May 13, 2016

    We have a problem that used to work on 1.0.1. This is an intended change not documented in this post or just a regression?

    open class Test(val parent:Demo) : Demo() {
    override fun a() {
    parent.a() // cannot access ‘a’: it is ‘protected’ in Demo (it worked on 1.0.1 and 1.0.1-2 but doesn’t work anymore on 1.0.2)

    abstract class Demo {
    abstract protected fun a(): Unit

    • Avatar

      Dmitry Jemerov says:

      May 14, 2016

      Yes, this is an intended change, mentioned in the changelog. Previous versions of Kotlin did not implement proper checks for ‘protected’ visibility, and the new one does.

  4. Avatar

    Bruno Ortiz says:

    May 14, 2016

    Congratulations! But the spring support doesn’t work in my project :/

    • Avatar

      Dmitry Jemerov says:

      May 14, 2016

      Please file a YouTrack issue with more details (a code sample and a description of what exactly you expect to work and what does not).

    • Avatar

      ache says:

      May 17, 2016

      Sorry for inconvenience. To use spring please try newly uploaded version 1.0.2-release-IJ143-96.

  5. Avatar

    unixxx says:

    May 14, 2016

    Are there any plans on making web framework for Kotlin?

  6. Avatar

    Ranie Jade Ramiso says:

    May 14, 2016

    I get this when setting kotlin.incremental to true in a gradle based project.

    Caused by: java.lang.NoSuchFieldError: FILE_HASHING_STRATEGY
    at com.intellij.util.containers.hash.HashUtil.hash(
    at com.intellij.util.containers.hash.LinkedHashMap.remove(
    at com.intellij.util.containers.SLRUMap.remove(
    at org.jetbrains.kotlin.incremental.LookupStorage.addFileIfNeeded(LookupStorage.kt:129)
    at org.jetbrains.kotlin.incremental.LookupStorage.access$addFileIfNeeded(LookupStorage.kt:32)
    at org.jetbrains.kotlin.incremental.LookupStorage$addAll$pathToId$1.invoke(LookupStorage.kt:73)
    at org.jetbrains.kotlin.incremental.LookupStorage$addAll$pathToId$1.invoke(LookupStorage.kt:32)
    at org.jetbrains.kotlin.utils.CollectionsKt.keysToMap(collections.kt:22)
    at org.jetbrains.kotlin.incremental.LookupStorage.addAll(LookupStorage.kt:73)
    at org.jetbrains.kotlin.incremental.BuildUtilKt.update(buildUtil.kt:151)
    at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompiler(Tasks.kt:426)
    at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompiler(Tasks.kt:149)
    at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.execute(Tasks.kt:110)
    at org.gradle.internal.reflect.JavaMethod.invoke(
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(
    … 60 more

  7. Avatar

    Misha says:

    May 15, 2016

    Is it possible to instantiate javascript class from Kotlin without declaring corresponding kotlin class?
    function Point() {
    this.x = 0
    this.y = 0
    Point.prototype = …
    Point.prototype.constructor = Point

    val point = Point() //this is translated to function call, i.e. Point() instead of new Point()

    Ofcourse if I add:
    class Point() {

    then everything works as expected.

    • Avatar

      Alexey Andreev says:

      May 16, 2016

      In your case Point() won’t be translated to anything, rather compiler reports “Unresolved reference” error. If you want to invoke JS directly, use the following notation:

      val point = js(“new Point()”)

  8. Avatar

    someone says:

    May 16, 2016

    Is it possible to set kotlin.incremental in build.gradle?

    • Avatar

      Alexey Tsvetkov says:

      May 16, 2016

      I’m afraid it’s not possible. You can use either or file.

      If it is not convenient for you, please create an issue in our bugtracker.

  9. Avatar

    Kostya says:

    May 17, 2016

    How detect that incremental compilation is working fine?

    • Avatar

      Alexander Udalov says:

      May 18, 2016

      The following warning message in your build log means that the IC is working: “Using experimental kotlin incremental compilation”

  10. Avatar

    Trevor says:

    May 19, 2016

    Thanks everyone! Kotlin is by far my favorite language to develop in, but unfortunately we’re still having trouble with developing Kotlin libraries.

    According to the change log, was fixed in this release, but we’re still having problems attaching Kotlin source (from the “Choose Sources” dialog).

    In the dialog, if we choose the top-level module, it doesn’t show the actual source as a source root, but it does show generated files in the /build/ directory as well as unit test files. If we manually dive down into /src/main the dialog will dismiss and we’ll get the permanent “Attaching…” problem seen in the ticket and the forum post.

    Found in Android Studio 2.1.1, Kotlin 1.0.2 and plugin 1.0.2-release-IJ143-96.

  11. Avatar

    SliBo says:

    May 23, 2016

    Thank you, Kotlin team.

    I’m Android developer.

    I decided to try to create an application using Kotlin language. So I decided to do to start something very simple. And I chose the quiz. Thus was born the app – Quizio: Geography

    Please donate it by your votes!

    Thanks a lot!