

Build toolsĬonfiguration cache support in Kotlin Gradle PluginĪs of Kotlin 1.4.30, the Kotlin Gradle plugin is compatible with the Gradle configuration cache. You can find a detailed description of the new language features and instructions on how to try them out in this blog post. We would like to know what expectations you have for them, the use cases where you want to apply these features, and any thoughts or ideas you have about them. So now we kindly ask you to give these language features a try and share your feedback with us. Once a module with a sealed interface is compiled, no new implementations can appear. The sealed modifier works on interfaces the same way: all implementations of a sealed interface are known at compile time. Interfaces can be declared sealed as well as classes. Kotlin code “understands” the new Java records and sees them as classes with Kotlin properties. Interoperability with Java always has been and always will be a priority for Kotlin. They are analogous to Kotlin data classes, mainly used as simple holders of data. Another upcoming improvement in the JVM ecosystem is Java records. They currently support inline classes, and they will support Valhalla primitive classes when project Valhalla becomes available. Value classes represent a more general concept and will support different optimizations in the future. Inline classes were previously a separate language feature, but now they have become a specific JVM optimization for a value class with one parameter. You can read more details about them in this post, and here’s a brief overview: New language features previewĪmong the new language features we plan to release in Kotlin 1.5.0 are inline value classes, JVM records, and sealed interfaces. More details about the update, ways to enable the new JVM IR backend, and how you can help stabilize it can be found here. This means you can safely use it in your projects. The new JVM backend reached Beta, and it now produces stable binaries. We’ve decided to cover two of the significant updates in separate blog posts so that we can provide more details on these features. Locale-agnostic API for upper/lowercasing text.Prototype lazy initialization for top-level properties.Configuration cache support in Kotlin Gradle Plugin.Value classes, JVM records, and sealed interfaces update.We hope you enjoy testing out all these new updates, and please let us know what you think.


We would really appreciate it if you would try them and share your feedback with us. This is the last 1.4 incremental release, so we have lots of new experimental features that we plan to make stable in 1.5.0.
