https://kotlinlang.org logo
Title
b

barteks2x

08/03/2019, 10:11 PM
thanks to intellij I'm almost completely stuck now
s

Soren Valle

08/03/2019, 10:14 PM
I'm not entirely sure, because I'm new to gradle myself, but you might try File>"Invalidate Caches/Restart" Also you could try deleting your generated gradle files.
b

barteks2x

08/03/2019, 10:15 PM
This is a nuclear option that will take almost as long as my "fumbling around" solution
s

Soren Valle

08/03/2019, 10:15 PM
Is this a recurring thing then?
b

barteks2x

08/03/2019, 10:16 PM
yes. It's an issue every single time I change something in buildSrc
s

Soren Valle

08/03/2019, 10:16 PM
Oh, gotcha.
b

barteks2x

08/03/2019, 10:16 PM
intellij just doesn't catch on and thinks everything is stll as it was when editing build.gradle.kts
it clearly has the option to refresh it but I have no idea how to reliably trigger it
s

Soren Valle

08/03/2019, 10:21 PM
That might be the option
b

barteks2x

08/03/2019, 10:22 PM
the issue is that intellij isn't even detecting that anything has changed. So autorefreesh won't help
it will just make the issue way more annoying because it will be all hidden behind magic autorefresh that doesn't work
s

Soren Valle

08/03/2019, 10:23 PM
That is annoying, what version are you on? 2019.2?
b

barteks2x

08/03/2019, 10:23 PM
yes
but again, gradle 4.8 and I know kotlin dsl support has been improved significantly in 5.x
but I can't upgrade
s

Soren Valle

08/03/2019, 10:26 PM
That might be it, but it doesn't seem like it. I wish I knew more. One that I do know from messing around with getting a scss to compile on change I had to trigger the project sync. I can't remember why, but what I remember is that for some reason I had to manually do it. That was different, but you might consider looking into that.
Meaning manually tell the ide that something has changed.
b

barteks2x

08/03/2019, 10:27 PM
I do "refresh gradle project" quite regularly when editing gradle plugin and have autorefresh disabled (because it takes forever). But this doesn't appear to have any way to force manually
at least not that I can find. The only option I see is when intellij decides it knows that something in buildscript dependencies has changed and offers me the option
s

Soren Valle

08/03/2019, 10:28 PM
You can make a macro and then bind it to a keyboard shortcut
b

barteks2x

08/03/2019, 10:29 PM
buildSrc is buildscript dependency, not project dependency. And if the option to force applying buildscript dependencies exists, it's really well hidden
s

Soren Valle

08/03/2019, 10:31 PM
Wait,I think I miss understood. In the picture you linked in main channel, you didn't select the auto reload, you want the first option "Apply Dependencies" to be a manual thing, is that correct?
b

barteks2x

08/03/2019, 10:33 PM
yes
I want to be able to do it whenever I want, not when intellij thinks something changed and shows me this option
it looks like adding a dummy classpath entry to buildscript dependencies that it has never seen before works quite reliably, but it's still just a weird workaround
s

Soren Valle

08/03/2019, 10:43 PM
That's a manual trigger there, would that do it for you?
b

barteks2x

08/03/2019, 10:44 PM
reimport gradle project is not it
s

Soren Valle

08/03/2019, 10:44 PM
That resyncs the deps for me
Different thing?
Man I'm sorry, I'm out of thoughts. Maybe a feature request. Sorry I couldn't be of more help
b

barteks2x

08/03/2019, 10:47 PM
I honeslty hate dealing with any issue trackers other than github so I will probably just keep doing what I have been doing, until a few days later where I no longer need to touch my buildscript for the next few months
s

Soren Valle

08/03/2019, 10:47 PM
Fair enough, hope you figure something. If you do, let me know.
I hate problems I can't solve.
b

barteks2x

08/03/2019, 10:49 PM
The only workaround I have is as I said to add a dummy classpath entry in buildscript {dependencies { } }
discovered it just a few minutes ago
s

Soren Valle

08/03/2019, 10:50 PM
Oh yeah, good to know.