Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install gradle on redhat/centos linux
# installs to /opt/gradle
# existing versions are not overwritten/deleted
# seamless upgrades/downgrades
# $GRADLE_HOME points to latest *installed* (not released)
wget -N${gradle_version}
sudo unzip -foq gradle-${gradle_version} -d /opt/gradle
sudo ln -sfn gradle-${gradle_version} /opt/gradle/latest
sudo printf "export GRADLE_HOME=/opt/gradle/latest\nexport PATH=\$PATH:\$GRADLE_HOME/bin" > /etc/profile.d/
. /etc/profile.d/
# check installation
gradle -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment