Kotlin has emerged as both substitute and supplement to C++ and Java. In 2018, the language had over 96,000 repositories on GitHub and had already reached 1.5M+ users.
More than 50% of professional Android developers now use the language to develop their apps. Google claims that this figure will increase dramatically. Since in future Kotlin will be the first to receive new Jetpack features.
The new Kotlin 1.3.50 release kicks off with various tooling and quality improvements to develop applications much faster. Let’s take a look at the major improvements from this release.
The one-click Java to Kotlin converter tool helps to convert an existing Java project, one file at a time. The converter is not meant to produce 100% error-free code, instead it’s built to reduce compilation errors.
The converted code might show nullability issues that require human intervention. Manual corrections fixes the code for the time being but it doesn’t foolproof the code from runtime errors that show up in the form of nullability mismatch.
The new improved version of Java-to-Kotlin converter (available in preview) tries to infer nullability more correctly based on the Java type usages in the code. And helps in making it easier than ever to convert code with fewer compilation errors. The generated Kotlin code is easier to manipulate too.
Bytecode has a lot of technical information and displaying all of that can make the code bulkier and unreadable. Kotlin ‘Variables’ view now highlights only the most relevant variables, which aids in easier debugging.
This addition helps in learning how to write idiomatic Kotlin code, improve performance of IDE actions, and fix several known situations that were causing the UI to freeze.
Dukat is a converter of TypeScript definition files to Kotlin declarations. By running the build task in Gradle, typesafe wrappers are automatically generated for npm dependencies and can be used from Kotlin.
Other Kotlin/JS updates
Earlier version names of Kotlin and Kotlin/Native differed from each other. This release uses version 1.3.50 for both Kotlin and Kotlin/Native binaries, reducing the complexity. As the standard library updates to support the kotlin.reflect.typeOf() function for Kotlin/Native types.
Here’s a link to the change log if you’re curious about the other features that are packaged in the Kotlin 1.3.50.
Let us know how you feel about the multiplatform Gradle plugins and handling nullibility errors manually. And ping us here if you need Kotlin development assistance.