Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kotlin: Incremental compilation with Gradle

In the M9 announcement it was said that incremental compilation is now supported. Does this also work with Gradle, especially Android? If yes, how to enable it?

like image 241
Kirill Rakhman Avatar asked Jan 16 '15 15:01

Kirill Rakhman


2 Answers

Update: as of Kotlin 1.1.1, Gradle incremental compilation is now enabled by default.

--- Old answer:

For now incremental compilation only works in the IDE when you use the Make algorithm supported by IntelliJ IDEA. We are looking into extending this to other build systems, but we are not there yet.

like image 116
Andrey Breslav Avatar answered Sep 29 '22 19:09

Andrey Breslav


Incremental compilation in Gradle and IDE was added in Kotlin 1.0.2. It is enabled in IDE is enabled by default. To enable it for Gradle you will need to add kotlin.incremental=true to your gradle.properties file.

like image 37
LukaCiko Avatar answered Sep 29 '22 17:09

LukaCiko