Hello! We are happy to announce the first Early Access Preview (EAP) build for Kotlin 1.3.70.

Highlights

.gradle.kts support enhancements We are happy to introduce the reworked IDE support for .gradle.kts files. Starting from this EAP, Kotlin plugin imports script dependencies during the Gradle project sync. The change improves user experience with the first script opening significantly. Note that the functionality requires at least Gradle 6.0 and IntelliJ IDEA 2019.2. Also, we minimized the number of requests to the Gradle daemon for script dependencies synchronization. It allowed us to reduce CPU load and speed up highlighting and completion. The change is especially noticeable on large projects. We still work on improving the user experience for script files. If you notice any glitches, please share your feedback with us.

Kotlin/JavaScript Optimized bundle for the browser. You can try it by creating a new Kotlin/JS browser project and calling build task. There are two build variants: production and development. Production variant is used by default on build task, and development – on run. Some tasks changed names: browserWebpack is now called browserProductionWebpack , and browserRun is now browserDevelopmentRun . Old tasks are still available, but no longer configurable as webpack tasks. Please update the task names in your build scripts. build/distribution directory now includes resources from src/main/resources (HTML, CSS, images, and so on), so you can simply publish its contents. Of course, gradle run also uses the distribution directory. Now you can declare NPM dependencies right in the root dependencies section: dependencies { implementation(npm("react", "16.12.0")) } IDEA Ultimate: you can start the Kotlin/JS debug session by clicking on an icon near the test method name. Also, you can start debugging by manually choosing nodeRun , nodeTest or browserTest task in the Gradle tool window. For browserRun , you can attach debugger after running the development server using the “Attach to Node.js/Chrome” run configuration. Test results for Kotlin/JS and Kotlin/Native are displayed right in the IDE, as it has always been for JVM tests. Besides, we fixed test filtering for Kotlin/JS, so you can run individual tests.





You can find the complete list of changes in the changelog.

Getting the EAP build

EAP 1: 1.3.70-eap-42

EAP 2: 1.3.70-eap-184

EAP 3: 1.3.70-eap-274

For IntelliJ IDEA

You can switch to the Early Access Preview channel in Tools → Kotlin → Configure Kotlin Plugin Updates. Change the update channel to ‘Early Access Preview 1.3.x’ and press Check for updates now.

Command-line compiler

Compiler binaries are available on the GitHub release page.

Multi-platform libraries

We prepared a set of multi-platform libraries compatible with this EAP:

For Gradle

Add the https://dl.bintray.com/kotlin/kotlin-eap repository URL to the list of project repositories. Here is how to do this in Gradle:

buildscript { ext.kotlin_version = "1.3.70-eap-274" repositories { maven { url "https://dl.bintray.com/kotlin/kotlin-eap" } } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } apply plugin: "kotlin" repositories { maven { url "https://dl.bintray.com/kotlin/kotlin-eap" } } dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib" }

For Maven

As with using Gradle, add the EAP repository:

<project ...> <properties> <kotlin.version>1.3.70-eap-274</kotlin.version> </properties> <repositories> <repository> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> <id>bintray.kotlin.eap</id> <name>Bintray Kotlin EAP Repository</name> <url>https://dl.bintray.com/kotlin/kotlin-eap</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> <id>bintray.kotlin.eap</id> <name>Bintray Kotlin EAP Repository</name> <url>https://dl.bintray.com/kotlin/kotlin-eap</url> </pluginRepository> </pluginRepositories> <dependencies> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-stdlib</artifactId> <version>${kotlin.version}</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-maven-plugin</artifactId> <version>${kotlin.version}</version> ... </plugin> </plugins> </build> </project>

We kindly ask you to provide feedback and report issues to our issue tracker. Please don’t forget to specify the version of your IDE, Kotlin plugin and build systems, as well as whether the new type inference is enabled or not.

External contributions

We would like to thank all our external contributors whose pull requests were included in this EAP: pyos, Steven Schäfer, Toshiaki Kameyama, Mark Punzalan, Mads Ager, Kristoffer Andersen, Jiaxiang Chen, Ivan Gavrilovic, Kevin Bierhoff, Juan Chen, Jens Klingenberg, Tillmann Berg, Dmitry Borodin, Louis CAD, Jim Sproch, Victor Turansky, Alexander Shustanov, Efeturi Money, Kerooker, Jordan Demeulenaere, Burak Eregar, Dat Trieu, DmiitriiJarosh.