'Gradle, mavenLocal() and --refresh-dependencies

When declaring the following into my build.gradle:

repositories {
    mavenLocal()
}

I can re-deploy similar Maven Artifacts (similar = with the exact same version) to Maven local, Gradle will pick up the latest which has been installed, without the need of using --refresh-dependencies

If, instead of declaring a mavenLocal() repository, I'm declaring a Maven Remote Repository, then I'll have to include --refresh-dependencies in order to be 100% sure I'm getting the latest of a published version. No problem here, this is expected ...

However, I don't understand why the same is not true for a mavenLocal() repository. I couldn't find any explanation in the documentation: Declaring a changing version.

Does anyone have any hints?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source