Feature request - add latest tag to the available list of version option


(Aram Mirzadeh) #1

Can we add a simple ‘latest’ tag to the latest release version so that

./gradlew wrapper --gradle-version=latest

would be possible? It would make life easier from a script point of view.

An alternative would be a simple HTTP GET page that just returns the latest verison so that we can use curl to get the latest version.

ver=$(curl -L http://gradle.com/latest-version)

(James Justinic) #2

Using curl is already possible. It’s not perfect in that the response is JSON and you minimally have to do something to extract it, even if not full parsing. However, this works (as one of many options) to get that value from the response without much effort:

ver=$(curl -Ls https://services.gradle.org/versions/current | grep '"version"' | cut -d '"' -f 4)

(Aram Mirzadeh) #3

Nice. Thank you for that. I didn’t know that end point existed. My original (part A) enhancement request still makes sense though, there is no downside and would make life a lot easier.