What is the “correct” way of setting up project dependencies when creating a new Gradle project in an IDE (specifically IDEA but this probably applies to Eclipse too).
The IDE needs to know where the jars are so it can compile / run tests. Project deps seem to be added by pointing the IDE at jars in the Gradle cache (.gradle/caches/blah). Or should they point at the jars in the local Maven repo? (.m2/repository/blah). It really isn’t clear to me.
Sometimes there are multiple versions of a snapshot (with the same version number - probably timestamped) in the Gradle cache at once - these are only distinguishable by a UUID which doesn’t tell me which is the correct (latest) one to point at.
And what if that snapshot expires? Or the cache gets wiped? Do I have to setup my project deps again, this time pointing at different UUIDs?
This all seems very hit and miss, and there’s got to be a better way. I am struggling at the moment to find a good consistent way to setup a Gradle project in IDEA.