I would like to work-around the issue that Gradle uses the first matching SNAPSHOT it can find, instead of checking other repositories as well for a snapshot that is same version but later build date. See Gradle does not check SNAPSHOT timestamps across repos
My current quick fix is to add a property like ‘gradle start -Plocal’ that will put mavenLocal() before maven remote, and thus give precedence to local snapshots. However, this is coarse-grained because it gives ALL local SNAPSHOT builds precedence over remote, even if they are weeks older.
One way to fix this would be to allow a user to override certain dependencies explicitly via command-line arguments. I would like to allow a user to tell what artifact he wants to use from his local Maven cache, instead of letting gradle fetch it from a remote Maven repository.
eg ‘gradle start -Plocal=my-own-artifact’
I would then say in the dependencies that that artifact needs to use mavenLocal() explicitly, while other use maven remote as usual. Apparantly this was asked before at http://stackoverflow.com/questions/17597516/gradle-specify-appropriate-repo-for-dependency
Is there any feature like this possible now, or coming?