Syntax highlighting for Kotlin-script files in Idea

I ported my Gradle project config to use Kotlin-script: now I have both build.gradle

and build.gradle.kts

and you can switch between them by setting settings.gradle

:

project(':myProject').buildFileName='build.gradle.kts'

      

The problem is that kts is build.gradle.kts

not redirected correctly: it doesn't resolve dependencies, it says it is version = 123

not a valid word, etc.

I am using Idea Ultimate 2017.1.3 and kotlin-plugin 1.1.2. What's the problem? Removing build.gradle

doesn't help either.

gradle-script-kotlin project files are correct.

+3


source to share


1 answer


The problem was probably the wrong gradle version. I have recreated the project with gradle version 3.5 and it works fine now. I should probably use the gradle wrapper to prevent the same issue from occurring on other developers' machines.



+1


source







All Articles