I never had it green in any IDE that I have: Andro...
# gradle
e
I never had it green in any IDE that I have: Android Studio 3.0, Android Studio 3.1 Canary, IDEA ultimate stable 2017.2.6, IDEA community edition 2017.3 EAP
n
Your issue is due to the flaky kts (Kotlin Script) file support, which is a 2nd class citizen compared to the kt support. Might want to consider using a programmer's text editor for editing kts files (eg Sublime Text).
e
The “flakiness” feeling might be due to https://youtrack.jetbrains.com/issue/KT-21420
1
e
Thank you guys, should I convert it to kt file?
I just looked to examples of the kotlin dsl
n
Unfortunately Kotlin DSL doesn't support doing build scripting in kt files 🙁. Gradle should consider that route if Kotlin scripting continues to be a 2nd class citizen in IntelliJ.
e
You can use
.kt
files in
buildSrc
or a binary plugin
n
Paul - If i'm reading this correctly (not seeing double) Gradle build scripts can be written in kt files instead of the kts ones, are you sure? How long has this feature been around in Gradle Kotlin DSL? Is there any further information available on this?
e
Nope, build scripts are
.kts
files, always It’s just that
buildSrc
or “binary plugins” are pure JVM code, they can be written with about anything you like, including pure Kotlin (
.kt
).
e
Thanks, so no kotlin for me as for now in build files, a bit sad