Yes --refresh-dependencies works but only on command line. Since i run the tasks via IDE i have to type this everytime manually. Is there a way to configure an equivalent in the configuration files?
You could configure how long to cache the resoultion result for the dynamic version as documented at Gradle User Manual: Version 7.2.
But maybe it would make more sense to instead use a composite build while you are working on the dependency, then it is always automatically rebuilt if necessary and always the latest state used.
And as a third alternative, at least if your ide is intellij, you should also be able to configure that it always uses --refresh-dependencies by default for new Gradle run configurations by editing the defaults.