Gradle latest release version of dependency within range
NickName:Nathaniel Shak Ask DateTime:2015-08-25T03:08:15

Gradle latest release version of dependency within range

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

More about “Gradle latest release version of dependency within range” related questions

Gradle latest release version of dependency within range

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....

Show Detail

Gradle - getting the latest release version of a dependency

What would be the easiest way to tell Gradle the following: Retrieve 'junit' dependency and take its latest 'release' version. Managing Maven and Ivy repositories is sort of new to me. I tried ...

Show Detail

Gradle - getting the latest release version of a dependency

What would be the easiest way to tell Gradle the following: Retrieve 'junit' dependency and take its latest 'release' version. Managing Maven and Ivy repositories is sort of new to me. I tried ...

Show Detail

How to make maven use the latest release version within version range?

In my maven project I use dependencies like this: <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <

Show Detail

Gradle Dependency Management: latest.integration vs. latest.release

I just came across a small question concerning Gradle's dependency management. I know that I can declare dependencies using latest.integration to reference snapshots or use latest.release to refere...

Show Detail

Gradle - unzipping latest version of dependency

I have the following gradle task that unzips a dependency which has been downloaded to tmp. task unzip(type: Copy) { def zipFile = file('tmp/dist-1.0.1.zip') def outDir = file("unpacked/dis...

Show Detail

Can gradle use latest.release as default dependency version?

I want to write version: 'latest.release' somewhere in build.gradle once. Then dependencies can be simplified like this: compile 'org.jsoup:jsoup' just like spring boot does: compile 'org.

Show Detail

How to let gradle always download the latest version of a dependency?

We have a custom gradle plugin, which is applied to all the projects we have. Since the plugin is released every several days, I don't want to update all the codebase to change it to use the latest

Show Detail

Gradle - How to get the latest code on Github even when dependency for latest version is set, but not getting it?

I am not completely familiar with Gradle, so this might be an extremely simple question. I have a dependency set on my build.gradle file to the latest version, however, when I look at the project's

Show Detail

Raw folder files are not included in Android release build in latest gradle version

Description: Added mp3 file under res/raw folder in Android native code to play mp3 file in app which is working in debug build but not able to play in release build. Issue: As per APK analysis,...

Show Detail