thanks to intellij I'm almost completely stuck now
# gradle
b
thanks to intellij I'm almost completely stuck now
s
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
This is a nuclear option that will take almost as long as my "fumbling around" solution
s
Is this a recurring thing then?
b
yes. It's an issue every single time I change something in buildSrc
s
Oh, gotcha.
b
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
message has been deleted
That might be the option
b
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
That is annoying, what version are you on? 2019.2?
b
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
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
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
You can make a macro and then bind it to a keyboard shortcut
b
buildSrc is buildscript dependency, not project dependency. And if the option to force applying buildscript dependencies exists, it's really well hidden
s
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
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
message has been deleted
That's a manual trigger there, would that do it for you?
b
reimport gradle project is not it
s
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
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
Fair enough, hope you figure something. If you do, let me know.
I hate problems I can't solve.
b
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
Oh yeah, good to know.