Gradle Daemon Support for Faster Compilation

We are currently working on improving compilation times. Today we are happy to invite you to try Kotlin 0.12.1230 making use of the Gradle Daemon. It eliminates startup costs, and your builds run faster. Continue reading

Posted in Tools | 35 Comments

Improving Java Interop: Top-Level Functions and Properties

Kotlin has had top-level functions and properties from day one. They are very convenient in many cases: from basic utilities to extensions for standard APIs.

But Kotlin code is not the only client, and today I’m going to explain how we are planning to improve on the Java interop when it comes to calling top-level functions and properties. Continue reading

Posted in Language design | 18 Comments

Better Annotation Processing: Supporting Stubs in kapt

We announced kapt, an Annotation Processing Tool for Kotlin, some time ago, and discussed its limitations. Now most of the limitations are going away with the updated version of kapt that is available as a 0.1-SNAPSHOT preview. Continue reading

Posted in Android, Libraries, Tools | 18 Comments

Kotlin Evolves: How to Keep Your Code Up

Kotlin is undergoing finalization, and as part of the process we are cleaning up: revising the language and its libraries. The biggest changes have been made in M12, but some more are coming. The point is to perform all the necessary breaking changes before we release 1.0, so that we can keep the language and libraries backwards-compatible after the release.

The trick is both we, ourselves, and you, our users, have quite a bit of code written in Kotlin already, and we don’t want all that code broken hopelessly on each update (some breakages are inevitable, unfortunately, but we are doing our best). The general scheme of making changes in a user-friendly way is “deprecate-release-remove”, for example:

  • in M12 we deprecated quite a few language constructs and library classes/functions,
  • then we released M12, so that whenever you use those to-be-removed language and library features, the compiler issues warnings,
  • in the next milestone we will remove those deprecated things completely, so that the compiler will issue errors instead of warnings.

So, if you have any deprecation warnings in your code, now is just the right time to get rid of them: the next major update will make all that code red, and your build will break.

Getting rid of deprecation warnings

As mentioned above, there are two kinds of deprecation warnings: language deprecations and library deprecations. To get rid of them we provide several options.
Continue reading

Posted in Libraries | 20 Comments

Kotlin Eclipse Plugin 0.2.0

Kotlin Eclipse Plugin 0.2.0

Today we are happy to present a new version of Kotlin plugin for Eclipse. This release includes the following features:

  • Update to Kotlin M12
  • Java to Kotlin converter
  • Navigation to Kotlin sources from Java
  • Kotlin syntax highlighting in Compare View

Continue reading

Posted in Tools | 3 Comments

Fibers and Actors in Kotlin with Quasar

In the previous post we mentioned that the Quasar library now supports Kotlin, providing awesome support for fibers (lightweight threads), Go-like channels, Erlang-like actors, and other asynchronous tools.

Our friends from Parallel Universe have published a blog post that dives into details of using Quasar with Kotlin. Even in the unlikely case that multithreading doesn’t concern you much, Quasar/Kotlin integration is a great example of a “DSL” library written in Kotlin, it uses

  • data classes
  • top-level functions
  • lambdas
  • annotated expressions
  • when-expressions
  • inline functions

to build a natural-looking and efficient API, and the blog post explains it very well.


Posted in Libraries | 2 Comments

Kotlin M12 is out!

We are happy to present Kotlin M12, bringing some rather important changes and new features:

  • New syntax for annotations and enums
  • More convenient semantics of function types
  • Better smart casts
  • kapt for Java Annotation Processing support
  • Multiple IDE features
  • and more…
    Continue reading
Posted in Releases | 47 Comments

kapt: Annotation Processing for Kotlin

This post is largely outdated.
Please check out Better Annotation Processing: Supporting Stubs in kapt

As there have been many requests to support Java Annotation Processing, we are working on it, and first results are ready for preview. This is the call for early feedback. Continue reading

Posted in Android, Tools | 21 Comments

Advanced Features of Anko

Last week we published a new version of Anko. While the main purpose of this library is creating layouts though a DSL, even the users of XML layouts can benefit from it. Today we are going to talk about such “ambivalent” features of Anko. Continue reading

Posted in Android | 3 Comments

Anko 0.6 is Released

Today we are glad to present the new version of Anko — a library which facilitates Android application development. We are happy to have received lots of feedback, and some of the changes in 0.6 were actually proposed by the community.
Continue reading

Posted in Android | 15 Comments