Gradle fails to resolve maven-style version range syntax for single version

I’m using Gradle 2.6. Below project will fail to resolve the junit dependency.

apply plugin: 'java'

repositories {
    jcenter()
}
dependencies {
    compile 'junit:junit:[4.12]'
}

This used to work in older versions, e.g. 2.3. It also works if conflict resolution takes place. So at least part of the dependency resolution code base can already handle this kind of version range.

Thanks for the report: I’ve confirmed this is a regression in Gradle 2.5. It’s now linked to issue GRADLE-3334.

Fixed in master: this fix will be in Gradle 2.7.
If you can confirm with a nightly build that would be great. (You’ll need 20150816 or later).

Thanks again for the report.