@Ivan Osipov: I’m sorry for not being clear before, that error exists in the IDEA Kotlin plugin EAP 1.1 but it has been fixed in later versions (one of which is linked from the samples/README.md above). Unfortunately the newer versions of the plugin are not compatible with the version of Gradle Script Kotlin shipped with Gradle 3.0. You would have to use a more recent snapshot (check
https://github.com/gradle/gradle-script-kotlin/releases/tag/v0.3.1 for instructions how).