Is there any improvements planned for Gradle’ Kotl...
# intellij
g
Is there any improvements planned for Gradle’ Kotlin DSL? Everytime i change something, analysis is so slow and getting a simple completion takes multiple seconds...
👍 4
d
I have the same issue since the beginning, but my friend does not.
m
Yeah, I decided to use kts on the new project and now I regret that decision.
sounds awesome in theory but way too slow in practice
Plus on every code change, I have to run two refresh tasks (gradle sync and dependencies update). It's not like gradle sync was not slow enough.
d
I dont regret the decision, I reckon it's mostly usable. But the performance issue should be addressed.
n
@GauthierPLM There were several improvements in 1.3.40. Have you tried it? @Matej Drobnič You don't need to call gradle sync on every code change: only script dependencies update is needed to have proper completion and highlighting in build.gradle.kts. Also script dependencies are updated automatically in the background and it shouldn't affect typing.
g
@nastelaz 1.3.40 is the first version I used. Plugin version is : 1.3.40-release-IJ2019.2-1 Kotlin version used in gradle file is : 1.3.40 So, I cannot say if there is any improvements, but I find it very slow on a high end machine with usually no issues at all.
n
@GauthierPLM Could you attach a snapshot to https://youtrack.jetbrains.com/issue/KT-28998?
m
You don't need to call gradle sync on every code change
Well if I don't, Android Studio will nag me with "Gradle files have changed since last project sync" popup
Natalia, what snapshot do you mean?
n
Well if I don't, Android Studio will nag me with "Gradle files have changed since last project sync" popup
Yes, this popup is needed to remind you to call gradle sync to have you changes in other build scripts or if your changes affects project structure. You can call it when you finish editing build script
m
ah you mean that. Yeah of course I'm pressin that after I'm done. But it still kinda annoying that I have to press two buttons after I'm finished with editing script (Sync gradle and apply dependenceis)
n
Applying script dependencies is more light weight operation because it affects only this particular script. So when you see this notification it's a good idea to press this notification to instantly have correct highlighting and completion with new dependencies. Also you can enable "auto applying" script dependencies. And the last: you can vote for https://youtrack.jetbrains.com/issue/KT-28909. but one more time: you don't need to run gradle sync each time when script dependencies are changed, you can only apply them and continue editing you script
d
@nastelaz speaking of typing in scripts, I have had to disable gradle auto sync a few updates ago because the build window takes focus when it encounters an error. It makes it unusable.
n
@Dico This looks like https://youtrack.jetbrains.com/issue/IDEA-179880. Feel free to add a comment here if you still experience this problem.
n
Unfortunately with some existing Kotlin Native projects Kotlin 1.3.40 can't be used due to the serious library linking regression (shows itself as a protocol error) ☹️.
m
wrong thread?
n
@napperley have you reported a bug in your tracker? And make attention: this thread is about slow highlighting in build.gradle.kts files
🆗 1
n
There was a bug reported from IntelliJ however it seems to have been lost in transit (can't find it in the bug tracker).
a
Just for the record, the Native bug is https://youtrack.jetbrains.com/issue/KT-32356
n
That is the new bug report I created in absence of the one that was lost in transit.
👍 1