I'm relatively new to Gradle and have been trying to figure out how to set certain dependencies in my build.gradle file to download the latest release version restricted to a certain major version.
I understand that latest.release is able to retrieve the latest release version, but haven't seen any way that this can be restricted to a particular major version. I also understand that using 15.+ or [15.0, 16.0) would allow you to find the latest version with a major version of 15, release or SNAPSHOT, for a particular dependency. However, I want to be able to download the latest release version of a particular dependency within a specified range, ignoring any SNAPSHOT versions.
Would anyone have any suggestions on how to do this?
Thanks
Clarifications:
Apparently this is not too difficult in the case in which snapshots and releases are in different repositories. However, in this case, I believe the snapshots and releases are in the same repository.
I am also using gradle 1.8
Copyright Notice:Content Author:「Nathaniel Shak」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/32189882/gradle-latest-release-version-of-dependency-within-range