This shows that Gradle is up to date:
thufir@doge:~$ sudo apt install gradle
Reading package lists... Done
Building dependency tree
Reading state information... Done
gradle is already the newest version (2.10-1).
0 upgraded, 0 newly installed, 0 to remove and 629 not upgraded.How do I upgrade to Gradle 4.x? Preferably, with umake rather than SDKMAN! which seems to be what they suggest.
(I don't want to update all the packages due to a slow connection.)
3 Answers
You could use the ppa for the almost-always latest version
sudo add-apt-repository ppa:cwchien/gradle
sudo apt-get update
sudo apt upgrade gradleor SDKMAN for the latest version
curl -s "" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install gradleAdvantages of the ppa
- auto-updates with the system
- no piping of downloaded scripts to the shell
Advantages of sdkman: latest version supplied by gradle themselves.
7You can also tell Gradle to update itself using a Gradle wrapper.
First you create the wrapper, then tell it to use the Gradle version of your choice:
gradle wrapper
./gradlew wrapper --gradle-version 4.9Now this project will use Gradle 4.9, independent of what's installed.
However, you need to remember to run Gradle through the wrapper, i.e., run ./gradlew instead of plain gradle.
The wrapper allows you to have different projects using different Gradle versions easily.
When you commit the created wrapper to source control, everybody who checks out the project will use the same Gradle version. This can help a lot with incompatible build scripts, when something has changed between Gradle versions.
1download from
pick the binary-only link as per
v4.10.3
Dec 05, 2018
Download: binary-only or complete
after you expand the download just update your PATH env var to pickup this new binary
vi ~/.bashrc # or where ever your shell's env vars are definedand add following line to bottom of ~/.bashrc
# replace ~/src/gradle-4.10.3/bin with your location
export PATH=~/src/gradle-4.10.3/bin:$PATHconfirm this works by issuing
source ~/.bashrc
gradle --version